]> git.donarmstrong.com Git - perltidy.git/blob - docs/ChangeLog.html
New upstream version 20220217
[perltidy.git] / docs / ChangeLog.html
1 <h1>Perltidy Change Log</h1>
2
3 <h2>2022 02 17</h2>
4
5 <pre><code>- A new flag, --encode-output-strings, or -eos, has been added to resolve
6   issue git #83. This issue involves the interface between Perl::Tidy and
7   calling programs, and Code::TidyAll (tidyall) in particular.  The problem
8   is that perltidy by default returns decoded character strings, but
9   tidyall expects encoded strings.  This flag provides a fix for that.
10
11   So, tidyall users who process encoded (utf8) files should update to this
12   version of Perl::Tidy and use -eos for tidyall.  For further info see:
13
14   https://github.com/houseabsolute/perl-code-tidyall/issues/84, and
15   https://github.com/perltidy/perltidy/issues/83
16
17   If there are other applications having utf8 problems at the interface
18   with Perl::Tidy, this flag probably may need to be set.
19
20 - The default value of the new flag, --encode-output-strings, -eos, is currently
21   -neos BUT THIS MAY CHANGE in a future release because the current
22   default is inconvenient.  So authors of programs which receive character
23   strings back from Perl::Tidy should set this flag, if necessary,
24   to avoid any problems when the default changes.  For more information see the
25   above links and the Perl::Tidy man pages for example coding.
26
27 - The possible values of the string 's' for the flag '--character-encoding=s'
28   have been limited to 'utf8' (or UTF-8), 'none', or 'guess'.  Previously an
29   arbitrary encoding could also be specified, but as a result of discussions
30   regarding git #83 it became clear that this could cause trouble
31   since the output encoding was still restricted to UTF-8. Users
32   who need to work in other encodings can write a short program calling
33   Perl::Tidy with pre- and post-processing to handle encoding/decoding.
34
35 - A new flag --break-after-labels=i, or -bal=i, was added for git #86.  This
36   controls line breaks after labels, to provide a uniform style, as follows:
37
38         -bal=0 follows the input line breaks [DEFAULT]
39         -bal=1 always break after a label
40         -bal=2 never break after a label
41
42   For example:
43
44       # perltidy -bal=1
45       INIT:
46         {
47             $xx = 1.234;
48         }
49
50       # perltidy -bal=2
51       INIT: {
52             $xx = 1.234;
53         }
54
55 - Fix issue git #82, an error handling something like ${bareword} in a
56   possible indirect object location. Perl allows this, now perltidy does too.
57
58 - The flags -kbb=s or --keep-old-breakpoints-before=s, and its counterpart
59   -kba=s or --keep-old-breakpoints-after=s have expanded functionality
60   for the container tokens: { [ ( } ] ).  The updated man pages have
61   details.
62
63 - Two new flags have been added to provide finer vertical alignment control,
64   --valign-exclusion-list=s (-vxl=s) and  --valign-inclusion-list=s (-vil=s).
65   This has been requested several times, most recently in git #79, and it
66   finally got done.  For example, -vil='=&gt;' means just align on '=&gt;'.
67
68 - A new flag -gal=s, --grep-alias-list=s, has been added as suggested in
69   git #77.  This allows code blocks passed to list operator functions to
70   be formatted in the same way as a code block passed to grep, map, or sort.
71   By default, the following list operators in List::Util are included:
72
73     all any first none notall reduce reductions
74
75   They can be changed with the flag -gaxl=s, -grep-alias-exclusion-list=s
76
77 - A new flag -xlp has been added which can be set to avoid most of the
78   limitations of the -lp flag regarding side comments, blank lines, and
79   code blocks.  See the man pages for more info. This fixes git #64 and git #74.
80   The older -lp flag still works.
81
82 - A new flag -lpil=s, --line-up-parentheses-inclusion-list=s, has been added
83   as an alternative to -lpxl=s, --line-up-parentheses-exclusion-list=s.
84   It supplies equivalent information but is much easier to describe and use.
85   It works for both the older -lp version and the newer -xlp.
86
87 - The coding for the older -lp flag has been updated to avoid some problems
88   and limitations.  The new coding allows the -lp indentation style to
89   mix smoothly with the standard indentation in a single file.  Some problems
90   where -lp and -xci flags were not working well together have been fixed, such
91   as happened in issue rt140025.  As a result of these updates some minor
92   changes in existing code using the -lp style may occur.
93
94 - This version of perltidy was stress-tested for many cpu hours with
95   random input parameters. No failures to converge, internal fault checks,
96   undefined variable references or other irregularities were seen.
97
98 - Numerous minor fixes have been made, mostly very rare formatting
99   instabilities found in random testing.
100 </code></pre>
101
102 <h2>2021 10 29</h2>
103
104 <pre><code>- No significant bugs have been found since the last release, but several
105   minor issues have been fixed.  Vertical alignment has been improved for
106   lists of call args which are not contained within parens (next item).
107
108 - Vertical alignment of function calls without parens has been improved with
109   the goal of making vertical alignment essentially the same with or
110   without parens around the call args.  Some examples:
111
112     # OLD
113     mkTextConfig $c, $x, $y, -anchor =&gt; 'se', $color;
114     mkTextConfig $c, $x + 30, $y, -anchor =&gt; 's',  $color;
115     mkTextConfig $c, $x + 60, $y, -anchor =&gt; 'sw', $color;
116     mkTextConfig $c, $x, $y + 30, -anchor =&gt; 'e', $color;
117
118     # NEW
119     mkTextConfig $c, $x,      $y,      -anchor =&gt; 'se', $color;
120     mkTextConfig $c, $x + 30, $y,      -anchor =&gt; 's',  $color;
121     mkTextConfig $c, $x + 60, $y,      -anchor =&gt; 'sw', $color;
122     mkTextConfig $c, $x,      $y + 30, -anchor =&gt; 'e',  $color;
123
124     # OLD
125     is id_2obj($id), undef, "unregistered object not retrieved";
126     is scalar keys %$ob_reg, 0, "object registry empty";
127     is register($obj), $obj, "object returned by register";
128     is scalar keys %$ob_reg, 1, "object registry nonempty";
129     is id_2obj($id), $obj, "registered object retrieved";
130
131     # NEW
132     is id_2obj($id),         undef, "unregistered object not retrieved";
133     is scalar keys %$ob_reg, 0,     "object registry empty";
134     is register($obj),       $obj,  "object returned by register";
135     is scalar keys %$ob_reg, 1,     "object registry nonempty";
136     is id_2obj($id),         $obj,  "registered object retrieved";
137
138   This will cause some changes in alignment, hopefully for the better,
139   particularly in test code which often uses numerous parenless function
140   calls with functions like 'ok', 'is', 'is_deeply', ....
141
142 - Two new parameters were added to control the block types to which the
143   -bl (--opening-brace-on-new-line) flag applies.  The new parameters are
144   -block-left-list=s, or -bll=s, and --block-left-exclusion-list=s,
145   or -blxl=s.  Previously the -bl flag was 'hardwired' to apply to
146   nearly all blocks. The default values of the new parameters
147   retain the the old default behavior but allow it to be changed.
148
149 - The default behavior of the -bli (-brace-left-and-indent) flag has changed
150   slightly.  Previously, if you set -bli, then the -bl flag would also
151   automatically be set.  Consequently, block types which were not included
152   in the default list for -bli would get -bl formatting.  This is no longer done,
153   and these two styles are now controlled independently.  The manual describes
154   the controls.  If you want to recover the exact previous default behavior of
155   the -bli then add the -bl flag.
156
157 - A partial fix was made for issue for git #74. The -lp formatting style was
158   being lost when a one-line anonymous sub was followed by a closing brace.
159
160 - Fixed issue git #73, in which the -nfpva flag was not working correctly.
161   Some unwanted vertical alignments of spaced function perens
162   were being made.
163
164 - Updated the man pages to clarify the flags -valign and -novalign
165   for turning vertical alignment on and off (issue git #72).
166   Added parameters -vc -vsc -vbc for separately turning off vertical
167   alignment of code, side comments and block comments.
168
169 - Fixed issue git #68, where a blank line following a closing code-skipping
170   comment, '#&gt;&gt;V', could be lost.
171
172 - This version runs 10 to 15 percent faster on large files than the
173   previous release due to optimizations made with the help of NYTProf.
174
175 - This version of perltidy was stress-tested for many cpu hours with
176   random input parameters. No instabilities,  internal fault checks,
177   undefined variable references or other irregularities were seen.
178
179 - Numerous minor fixes have been made, mostly very rare formatting instabilities
180   found in random testing. An effort has been made to minimize changes to
181   existing formatting that these fixes produce, but occasional changes
182   may occur. Many of these updates are listed at:
183
184        https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
185 </code></pre>
186
187 <h2>2021 07 17</h2>
188
189 <pre><code>- This release is being made mainly because of the next item, in which an
190   error message about an uninitialized value error message could be produced
191   in certain cases when format-skipping is used.  The error message was
192   annoying but harmless to formatting.
193
194 - Fixed an undefined variable message, see git #67. When a format skipping
195   comment '#&lt;&lt;' is placed before the first line of code in a script, a
196   message 'Use of uninitialized value $Ktoken_vars in numeric ...' can
197   occur.
198
199 - A warning will no longer be given if a script has an opening code-skipping
200   comment '#&lt;&lt;V' which is not terminated with a closing comment '#&gt;&gt;V'. This
201   makes code-skipping and format-skipping behave in a similar way: an
202   opening comment without a corresponding closing comment will cause
203   the rest of a file to be skipped.  If there is a question about which lines
204   are skipped, a .LOG file can be produced with the -g flag and it will have
205   this information.
206
207 - Removed the limit on -ci=n when -xci is set, reference: rt #136415.
208   This update removes a limit in the previous two versions in which the
209   value of -ci=n was limited to the value of -i=n when -xci was set.
210   This limit had been placed to avoid some formatting instabilities,
211   but recent coding improvements allow the limit to be removed.
212
213 - The -wn and -bbxx=n flags were not working together correctly. This has
214   been fixed.
215
216 - This version may produce occasional differences in formatting compared to
217   previous versions, mainly for lines which are near the specified line
218   length limit.  This is due to ongoing efforts to eliminate edge cases of
219   formatting instability.
220
221 - Numerous minor fixes have been made. A complete list is at:
222
223        https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
224 </code></pre>
225
226 <h2>2021 06 25</h2>
227
228 <pre><code>- This release adds several new requested parameters.  No significant bugs have
229   been found since the last release, but a number of minor problems have been
230   corrected.
231
232 - Added a new option '--code-skipping', requested in git #65, in which code
233   between comment lines '#&lt;&lt;V' and '#&gt;&gt;V' is passed verbatim to the output
234   stream without error checking.  It is simmilar to --format-skipping
235   but there is no error checking of the skipped code. This can be useful for
236   skipping past code which employs an extended syntax.
237
238 - Added a new option for closing paren placement, -vtc=3, requested in rt #136417.
239
240 - Added flag -atnl, --add-terminal-newline, to help issue git #58.
241   This flag tells perltidy to terminate the last line of the output stream
242   with a newline character, regardless of whether or not the input stream
243   was terminated with a newline character.  This is the default.
244   If this flag is negated, with -natnl, then perltidy will add a terminal
245   newline character to the the output stream only if the input
246   stream is terminated with a newline.
247
248 - Some nested structures formatted with the -lp indentation option may have
249   some changes in indentation.  This is due to updates which were made to
250   prevent formatting instability when line lengths are limited by the maximum line
251   length. Most scripts will not be affected. If this causes unwanted formatting
252   changes, try increasing the --maximum-line-length by a few characters.
253
254 - Numerous minor fixes have been made. A complete list is at:
255
256        https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
257 </code></pre>
258
259 <h2>2021 04 02</h2>
260
261 <pre><code>- This release fixes several non-critical bugs which have been found since the last
262 release.  An effort has been made to keep existing formatting unchanged.
263
264 - Fixed issue git #57 regarding uninitialized warning flag.
265
266 - Added experimental flag -lpxl=s requested in issue git #56 to provide some
267 control over which containers get -lp indentation.
268
269 - Fixed issue git #55 regarding lack of coordination of the --break-before-xxx
270 flags and the --line-up-parens flag.
271
272 - Fixed issue git #54 regarding irregular application of the --break-before-paren
273 and similar --break-before-xxx flags, in which lists without commas were not
274 being formatted according to these flags.
275
276 - Fixed issue git #53. A flag was added to turn off alignment of spaced function
277 parens.  If the --space-function-paren, -sfp flag is set, a side-effect is that the
278 spaced function parens may get vertically aligned.  This can be undesirable,
279 so a new parameter '--function-paren-vertical-alignment', or '-fpva', has been
280 added to turn this vertical alignment off. The default is '-fpva', so that
281 existing formatting is not changed.  Use '-nfpva' to turn off unwanted
282 vertical alignment.  To illustrate the possibilities:
283
284     # perltidy [default]
285     myfun( $aaa, $b, $cc );
286     mylongfun( $a, $b, $c );
287
288     # perltidy -sfp
289     myfun     ( $aaa, $b, $cc );
290     mylongfun ( $a, $b, $c );
291
292     # perltidy -sfp -nfpva
293     myfun ( $aaa, $b, $cc );
294     mylongfun ( $a, $b, $c );
295
296 - Fixed issue git #51, a closing qw bare paren was not being outdented when
297 the -nodelete-old-newlines flag was set.
298
299 - Fixed numerous edge cases involving unusual parameter combinations which
300   could cause alternating output states.  Most scripts will not be
301   changed by these fixes.
302
303 - A more complete list of updates is at
304
305        https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
306 </code></pre>
307
308 <h2>2021 01 11</h2>
309
310 <pre><code>- Fixed issue git #49, -se breaks warnings exit status behavior.
311 The exit status flag was not always being set when the -se flag was set.
312
313 - Some improvements have been made in the method for aligning side comments.
314 One of the problems that was fixed is that there was a tendency for side comment
315 placement to drift to the right in long scripts.  Programs with side comments
316 may have a few changes.
317
318 - Some improvements have been made in formatting qw quoted lists.  This
319 fixes issue git #51, in which closing qw pattern delimiters not always
320 following the settings specified by the --closing-token-indentation=n settings.
321 Now qw closing delimiters ')', '}' and ']' follow these flags, and the
322 delimiter '&gt;' follows the flag for ')'.  Other qw pattern delimiters remain
323 indented as the are now.  This change will cause some small formatting changes
324 in some existing programs.
325
326 - Another change involving qw lists is that they get full indentation,
327 rather than just continuation indentation, if
328
329      (1) the closing delimiter is one of } ) ] &gt; and is on a separate line,
330      (2) the opening delimiter  (i.e. 'qw{' ) is also on a separate line, and
331      (3) the -xci flag (--extended-continuation-indentation) is set.
332
333 This improves formatting when qw lists are contained in other lists. For example,
334
335         # OLD: perltidy
336         foreach $color (
337             qw(
338             AntiqueWhite3 Bisque1 Bisque2 Bisque3 Bisque4
339             SlateBlue3 RoyalBlue1 SteelBlue2 DeepSkyBlue3
340             ),
341             qw(
342             LightBlue1 DarkSlateGray1 Aquamarine2 DarkSeaGreen2
343             SeaGreen1 Yellow1 IndianRed1 IndianRed2 Tan1 Tan4
344             )
345           )
346
347         # NEW, perltidy -xci
348         foreach $color (
349             qw(
350                 AntiqueWhite3 Bisque1 Bisque2 Bisque3 Bisque4
351                 SlateBlue3 RoyalBlue1 SteelBlue2 DeepSkyBlue3
352             ),
353             qw(
354                 LightBlue1 DarkSlateGray1 Aquamarine2 DarkSeaGreen2
355                 SeaGreen1 Yellow1 IndianRed1 IndianRed2 Tan1 Tan4
356             )
357           )
358
359 - Some minor improvements have been made to the rules for formatting
360 some edge vertical alignment cases, usually involving two dissimilar lines.
361
362 - A more complete list of updates is at
363
364        https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
365 </code></pre>
366
367 <h2>2020 12 07</h2>
368
369 <pre><code>- Fixed issue git #47, incorrect welding of anonymous subs.
370   An incorrect weld format was being made when the --weld-nested-containers option
371   (-wn) was used in to format a function which returns a list of anonymous subs.
372   For example, the following snippet was incorrectly being welded.
373
374 $promises[$i]-&gt;then(
375     sub { $all-&gt;resolve(@_); () },
376     sub {
377         $results-&gt;[$i] = [@_];
378         $all-&gt;reject(@$results) if --$remaining &lt;= 0;
379         return ();
380     }
381 );
382
383 This was due to an error introduced in v20201201 related to parsing sub
384 signatures.  Reformatting with the current version will fix the problem.
385 </code></pre>
386
387 <h2>2020 12 01</h2>
388
389 <pre><code>- This release is being made primarily to make available a several new formatting
390   parameters, in particular -xci, -kbb=s, -kba=s, and -wnxl=s. No significant
391   bugs have been found since the previous release, but numerous minor issues have
392   been found and fixed as listed below.
393
394 - This version is about 20% faster than the previous version due to optimizations
395   made with the help of Devel::NYTProf.
396
397 - Added flag -wnxl=s, --weld-nested-exclusion-list=s, to provide control which containers
398   are welded with the --weld-nested-containers parameter.  This is related to issue git #45.
399
400 - Merged pull request git #46 which fixes the docs regarding the -fse flag.
401
402 - Fixed issue git #45, -vtc=n flag was ignored when -wn was set.
403
404 - implement request RT #133649, delete-old-newlines selectively. Two parameters,
405
406   -kbb=s or --keep-old-breakpoints-before=s, and
407   -kba=s or --keep-old-breakpoints-after=s
408
409   were added to request that old breakpoints be kept before or after
410   selected token types.  For example, -kbb='=&gt;' means that newlines before
411   fat commas should be kept.
412
413 - Fix git #44, fix exit status for assert-tidy/untidy.  The exit status was
414   always 0 for --assert-tidy if the user had turned off all error messages with
415   the -quiet flag.  This has been fixed.
416
417 - Add flag -maxfs=n, --maximum-file-size-mb=n.  This parameter is provided to
418   avoid causing system problems by accidentally attempting to format an 
419   extremely large data file. The default is n=10.  The command to increase 
420   the limit to 20 MB for example would be  -mfs=20.  This only applies to
421   files specified by filename on the command line.
422
423 - Skip formatting if there are too many indentation level errors.  This is 
424   controlled with -maxle=n, --maximum-level-errors=n.  This means that if 
425   the ending indentation differs from the starting indentation by more than
426   n levels, the file will be output verbatim. The default is n=1. 
427   To skip this check, set n=-1 or set n to a large number.
428
429 - A related new flag, --maximum-unexpected-errors=n, or -maxue=n, is available
430   but is off by default.
431
432 - Add flag -xci, --extended-continuation-indentation, regarding issue git #28
433   This flag causes continuation indentation to "extend" deeper into structures.
434   Since this is a fairly new flag, the default is -nxci to avoid disturbing 
435   existing formatting.  BUT you will probably see some improved formatting
436   in complex data structures by setting this flag if you currently use -ci=n 
437   and -i=n with the same value of 'n' (as is the case if you use -pbp, 
438   --perl-best-practices, where n=4).
439
440 - Fix issue git #42, clarify how --break-at-old-logical-breakpoints works.
441   The man page was updated to note that it does not cause all logical breakpoints
442   to be replicated in the output file.
443
444 - Fix issue git #41, typo in manual regarding -fsb.
445
446 - Fix issue git #40: when using the -bli option, a closing brace followed by 
447   a semicolon was not being indented.  This applies to braces which require 
448   semicolons, such as a 'do' block.
449
450 - Added 'state' as a keyword.
451
452 - A better test for convergence has been added. When iterations are requested,
453   the new test will stop after the first pass if no changes in line break
454   locations are made.  Previously, file checksums were used and required at least two 
455   passes to verify convergence unless no formatting changes were made.  With the new test, 
456   only a single pass is needed when formatting changes are limited to adjustments of 
457   indentation and whitespace on the lines of code.  Extensive testing has been made to
458   verify the correctness of the new convergence test.
459
460 - Line breaks are now automatically placed after 'use overload' to 
461   improve formatting when there are numerous overloaded operators.  For
462   example
463
464     use overload
465       '+' =&gt; sub {
466       ...
467
468 - A number of minor problems with parsing signatures and prototypes have
469   been corrected, particularly multi-line signatures. Some signatures 
470   had previously been parsed as if they were prototypes, which meant the 
471   normal spacing rules were not applied.  For example
472
473   OLD:
474     sub echo ($message= 'Hello World!' ) {
475         ...;
476     }
477
478   NEW:
479     sub echo ( $message = 'Hello World!' ) {
480         ...;
481     }
482
483 - Numerous minor issues that the average user would not encounter were found
484   and fixed. They can be seen in the more complete list of updates at 
485
486        https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
487 </code></pre>
488
489 <h2>2020 10 01</h2>
490
491 <pre><code>- Robustness of perltidy has been significantly improved.  Updating is recommended. Continual 
492   automated testing runs began about 1 Sep 2020 and numerous issues have been found and fixed. 
493   Many involve references to uninitialized variables when perltidy is fed random text and random
494   control parameters. 
495
496 - Added the token '-&gt;' to the list of alignment tokens, as suggested in git
497   #39, so that it can be vertically aligned if a space is placed before them with -wls='-&gt;'.
498
499 - Added parameters -bbhb=n (--break-before-hash-brace=n), -bbsb=n (--break-before-square-bracket=n),
500   and -bbp=n (--break-before-paren=n) suggested in git #38.  These provide control over the
501   opening container token of a multiple-line list.  Related new parameters -bbhbi=n, -bbsbi=n, -bbpi=n
502   control indentation of these tokens.
503
504 - Added keyword 'isa'.
505 </code></pre>
506
507 <h2>2020 09 07</h2>
508
509 <pre><code>- Fixed bug git #37, an error when the combination -scbb -csc was used.
510   It occurs in perltidy versions 20200110, 20200619, and 20200822.  What happens is
511   that when two consecutive lines with isolated closing braces had new side
512   comments generated by the -csc parameter, a separating newline was missing.
513   The resulting script will not then run, but worse, if it is reformatted with
514   the same parameters then closing side comments could be overwritten and data
515   lost. 
516
517   This problem was found during automated random testing.  The parameter
518   -scbb is rarely used, which is probably why this has not been reported.  Please
519   upgrade your version.
520
521 - Added parameter --non-indenting-braces, or -nib, which prevents
522   code from indenting one level if it follows an opening brace marked 
523   with a special side comment, '#&lt;&lt;&lt;'.  For example,
524
525                 { #&lt;&lt;&lt;   a closure to contain lexical vars
526
527                 my $var;  # this line does not indent
528
529                 }
530
531                 # this line cannot 'see' $var;
532
533   This is on by default.  If your code happens to have some
534   opening braces followed by '#&lt;&lt;&lt;', and you
535   don't want this, you can use -nnib to deactivate it. 
536
537 - Side comment locations reset at a line ending in a level 0 open
538   block, such as when a new multi-line sub begins.  This is intended to 
539   help keep side comments from drifting to far to the right.
540 </code></pre>
541
542 <h2>2020 08 22</h2>
543
544 <pre><code>- Fix RT #133166, encoding not set for -st.  Also reported as RT #133171
545   and git #35. 
546
547   This is a significant bug in version 20200616 which can corrupt data if
548   perltidy is run as a filter on encoded text.
549 </code></pre>
550
551 <p><strong>Please upgrade</strong></p>
552
553 <pre><code>- Fix issue RT #133161, perltidy -html was not working on pod
554
555 - Fix issue git #33, allow control of space after '-&gt;'
556
557 - Vertical alignment has been improved. Numerous minor issues have
558   been fixed.
559
560 - Formatting with the -lp option is improved. 
561
562 - Fixed issue git #32, misparse of bare 'ref' in ternary
563
564 - When --assert-tidy is used and triggers an error, the first difference
565   between input and output files is shown in the error output. This is
566   a partial response to issue git #30.
567 </code></pre>
568
569 <h2>2020 06 19</h2>
570
571 <pre><code>- Added support for Switch::Plain syntax, issue git #31.
572
573 - Fixed minor problem where trailing 'unless' clauses were not 
574   getting vertically aligned.
575
576 - Added a parameter --logical-padding or -lop to allow logical padding
577   to be turned off.  Requested by git #29. This flag is on by default.
578   The man pages have examples.
579
580 - Added a parameter -kpit=n to control spaces inside of parens following
581   certain keywords, requested in git#26. This flag is off by default.
582
583 - Added fix for git#25, improve vertical alignment for long lists with
584   varying numbers of items per line.
585
586 - calls to the module Perl::Tidy can now capture any output produced
587   by a debug flag or one of the 'tee' flags through the new 'debugfile' and
588   'teefile' call parameters.  These output streams are rarely used but
589   they are now treated the same as any 'logfile' stream.
590
591 - add option --break-at-old-semicolon-breakpoints', -bos, requested 
592   in RT#131644.  This flag will keep lines beginning with a semicolon.
593
594 - Added --use-unicode-gcstring to control use of Unicode::GCString for
595   evaluating character widths of encoded data.  The default is 
596   not to use this (--nouse-unicode-gcstring). If this flag is set,
597   perltidy will look for Unicode::GCString and, if found, will use it 
598   to evaluate character display widths.  This can improve displayed
599   vertical alignment for files with wide characters.  It is a nice
600   feature but it is off by default to avoid conflicting formatting
601   when there are multiple developers.  Perltidy installation does not 
602   require Unicode::GCString, so users wanting to use this feature need 
603   set this flag and also to install Unicode::GCString separately.
604
605 - Added --character-encoding=guess or -guess to have perltidy guess
606   if a file (or other input stream) is encoded as -utf8 or some 
607   other single-byte encoding. This is useful when processing a mixture 
608   of file types, such as utf8 and latin-1.
609
610   Please Note: The default encoding has been set to be 'guess'
611   instead of 'none'. This seems like the best default, since 
612   it allows perltidy work properly with both
613   utf8 files and older latin-1 files.  The guess mode uses Encode::Guess,
614   which is included in standard perl distributions, and only tries to 
615   guess if a file is utf8 or not, never any other encoding.  If the guess is 
616   utf8, and if the file successfully decodes as utf8, then it the encoding 
617   is assumed to be utf8.  Otherwise, no encoding is assumed. 
618   If you do not want to use this new default guess mode, or have a 
619   problem with it, you can set --character-encoding=none (the previous 
620   default) or --character-encoding=utf8 (if you deal with utf8 files).
621
622 - Specific encodings of input files other than utf8 may now be given, for
623   example --character-encoding=euc-jp.
624
625 - Fix for git#22, Preserve function signature on a single line. An
626   unwanted line break was being introduced when a closing signature paren
627   followed a closing do brace.
628
629 - Fix RT#132059, the -dac parameter was not working and caused an error exit
630
631 - When -utf8 is used, any error output is encoded as utf8
632
633 - Fix for git#19, adjust line break around an 'xor'
634
635 - Fix for git#18, added warning for missing comma before unknown bare word.
636 </code></pre>
637
638 <h2>2020 01 10</h2>
639
640 <pre><code>- This release adds a flag to control the feature RT#130394 (allow short nested blocks)
641   introduced in the previous release.  Unfortunately that feature breaks 
642   RPerl installations, so a control flag has been introduced and that feature is now
643   off by default.  The flag is:
644
645   --one-line-block-nesting=n, or -olbn=n, where n is an integer as follows: 
646
647   -olbn=0 break nested one-line blocks into multiple lines [new DEFAULT]
648   -olbn=1 stable; keep existing nested-one line blocks intact [previous DEFAULT]
649
650   For example, consider this input line:
651
652     foreach (@list) { if ($_ eq $asked_for) { last } ++$found }
653
654   The new default behavior (-olbn=0), and behavior prior to version 20191203, is to break it into multiple lines:
655
656     foreach (@list) {
657         if ( $_ eq $asked_for ) { last }
658         ++$found;
659     }
660
661   To keep nested one-line blocks such as this on a single line you can add the parameter -olbn=1.
662
663 - Fixed issue RT#131288: parse error for un-prototyped constant function without parenthesized
664   call parameters followed by ternary.
665
666 - Fixed issue RT#131360, installation documentation.  Added a note that the binary 
667   'perltidy' comes with the Perl::Tidy module. They can both normally be installed with 
668   'cpanm Perl::Tidy'
669 </code></pre>
670
671 <h2>2019 12 03</h2>
672
673 <pre><code>- Fixed issue RT#131115: -bli option not working correctly.
674   Closing braces were not indented in some cases due to a glitch
675   introduced in version 20181120.
676
677 - Fixed issue RT#130394: Allow short nested blocks.  Given the following
678
679     $factorial = sub { reduce { $a * $b } 1 .. 11 };
680
681   Previous versions would always break the sub block because it
682   contains another block (the reduce block).  The fix keeps
683   short one-line blocks such as this intact.
684
685 - Implement issue RT#130640: Allow different subroutine keywords.
686   Added a flag --sub-alias-list=s or -sal=s, where s is a string with
687   one or more aliases for 'sub', separated by spaces or commas.
688   For example,
689
690     perltidy -sal='method fun' 
691
692   will cause the perltidy to treat the words 'method' and 'fun' to be
693   treated the same as if they were 'sub'.
694
695 - Added flag --space-prototype-paren=i, or -spp=i, to control spacing 
696   before the opening paren of a prototype, where i=0, 1, or 2:
697   i=0 no space
698   i=1 follow input [current and default]
699   i=2 always space
700
701   Previously, perltidy always followed the input.
702   For example, given the following input 
703
704      sub usage();
705
706   The result will be:
707     sub usage();    # i=0 [no space]
708     sub usage();    # i=1 [default; follows input]
709     sub usage ();   # i=2 [space]
710
711 - Fixed issue git#16, minor vertical alignment issue.
712
713 - Fixed issue git#10, minor conflict of -wn and -ce
714
715 - Improved some vertical alignments involving two lines.
716 </code></pre>
717
718 <h2>2019 09 15</h2>
719
720 <pre><code>- fixed issue RT#130344: false warning "operator in print statement" 
721   for "use lib". 
722
723 - fixed issue RT#130304: standard error output should include filename.
724   When perltidy error messages are directed to the standard error output 
725   with -se or --standard-error-output, the message lines now have a prefix 
726   'filename:' for clarification in case multiple files 
727   are processed, where 'filename' is the name of the input file.  If 
728   input is from the standard input the displayed filename is '&lt;stdin&gt;', 
729   and if it is from a data structure then displayed filename 
730   is '&lt;source_stream&gt;'.
731
732 - implement issue RT#130425: check mode.  A new flag '--assert-tidy'
733   will cause an error message if the output script is not identical to
734   the input script. For completeness, the opposite flag '--assert-untidy'
735   has also been added.  The next item, RT#130297, insures that the script
736   will exit with a non-zero exit flag if the assertion fails.
737
738 - fixed issue RT#130297; the perltidy script now exits with a nonzero exit 
739   status if it wrote to the standard error output. Prevously only fatal
740   run errors produced a non-zero exit flag. Now, even non-fatal messages
741   requested with the -w flag will cause a non-zero exit flag.  The exit
742   flag now has these values:
743
744      0 = no errors
745      1 = perltidy could not run to completion due to errors
746      2 = perltidy ran to completion with error messages
747
748 - added warning message for RT#130008, which warns of conflicting input
749   parameters -iob and -bom or -boc.
750
751 - fixed RT#129850; concerning a space between a closing block brace and
752   opening bracket or brace, as occurs before the '[' in this line:
753
754    my @addunix = map { File::Spec::Unix-&gt;catfile( @ROOT, @$_ ) } ['b'];
755
756   Formerly, any space was removed. Now it is optional, and the output will
757   follow the input.
758
759 - fixed issue git#13, needless trailing whitespace in error message
760
761 - fixed issue git#9: if the -ce (--cuddled-else) flag is used,
762   do not try to form new one line blocks for a block type 
763   specified with -cbl, particularly map, sort, grep
764
765 - iteration speedup for unchanged code.  Previously, when iterations were
766   requested, at least two formatting passes were made. Now just a single pass
767   is made if the formatted code is identical to the input code.
768
769 - some improved vertical alignments
770 </code></pre>
771
772 <h2>2019 06 01</h2>
773
774 <pre><code>- rt #128477: Prevent inconsistent owner/group and setuid/setgid bits. 
775   In the -b (--backup-and-modify-in-place) mode, an attempt is made to set ownership
776   of the output file equal to the input file, if they differ.
777   In all cases, if the final output file ownership differs from input file, any setuid/setgid bits are cleared.
778
779 - Added option -bom  (--break-at-old-method-breakpoints) by
780   merrillymeredith which preserves breakpoints of method chains. Modified to also handle a cuddled call style.
781
782 - Merged patch to fix Windows EOL translation error with UTF-8 written by
783   Ron Ivy. This update prevents automatic conversion to 'DOS' CRLF line
784   endings.  Also, Windows system testing at the appveyor site is working again.
785
786 - RT #128280, added flag --one-line-block-semicolons=n (-olbs=n) 
787   to control semicolons in one-line blocks.  The values of n are:
788     n=0 means no semicolons termininating simple one-line blocks
789     n=1 means stable; do not change from input file [DEFAULT and current]
790     n=2 means always add semicolons in one-line blocks
791   The current behavior corresponds to the default n=1.
792
793 - RT #128216, Minor update to prevent inserting unwanted blank line at
794   indentation level change.  This should not change existing scripts.
795
796 - RT #81852: Improved indentation when quoted word (qw) lists are 
797   nested within other containers using the --weld-nested (-wn) flag.
798   The example given previously (below) is now closer to what it would
799   be with a simple list instead of qw:
800
801   # perltidy -wn
802   use_all_ok( qw{
803       PPI
804       PPI::Tokenizer
805       PPI::Lexer
806       PPI::Dumper
807       PPI::Find
808       PPI::Normal
809       PPI::Util
810       PPI::Cache
811   } );
812
813 - RT#12764, introduced new feature allowing placement of blanks around
814   sequences of selected keywords. This can be activated with the -kgb* 
815   series of parameters described in the manual.
816
817 - Rewrote vertical algnment module.  It is better at finding
818   patterns in complex code. For example,
819
820 OLD:
821        /^-std$/ &amp;&amp; do { $std       = 1;     next; };
822        /^--$/   &amp;&amp; do { @link_args = @argv; last; };
823        /^-I(.*)/ &amp;&amp; do { $path = $1 || shift @argv; next; };
824
825 NEW:
826        /^-std$/  &amp;&amp; do { $std       = 1;                 next; };
827        /^--$/    &amp;&amp; do { @link_args = @argv;             last; };
828        /^-I(.*)/ &amp;&amp; do { $path      = $1 || shift @argv; next; };
829
830 - Add repository URLs to META files 
831
832 - RT #118553, "leave only one newline at end of file". This option was not 
833   added because of undesirable side effects, but a new filter script
834   was added which can do this, "examples/delete_ending_blank_lines.pl".
835 </code></pre>
836
837 <h2>2018 11 20</h2>
838
839 <pre><code>- fix RT#127736 Perl-Tidy-20181119 has the EXE_FILES entry commented out in
840   Makefile.PL so it doesn't install the perltidy script or its manpage.
841 </code></pre>
842
843 <h2>2018 11 19</h2>
844
845 <pre><code>- Removed test case 'filter_example.t' which was causing a failure on a
846   Windows installation for unknown reasons, possibly due to an unexpected
847   perltidyrc being read by the test script.  Added VERSION numbers to all
848   new modules.
849 </code></pre>
850
851 <h2>2018 11 17</h2>
852
853 <pre><code>- Fixed RT #126965, in which a ternary operator was misparsed if immediately
854   following a function call without arguments, such as: 
855     my $restrict_customer = shift ? 1 : 0;
856
857 - Fixed RT #125012: bug in -mangle --delete-all-comments
858   A needed blank space before bareword tokens was being removed when comments 
859   were deleted
860
861 - Fixed RT #81852: Stacked containers and quoting operators. Quoted words
862   (qw) delimited by container tokens ('{', '[', '(', '&lt;') are now included in
863   the --weld-nested (-wn) flag:
864
865       # perltidy -wn
866       use_all_ok( qw{
867             PPI
868             PPI::Tokenizer
869             PPI::Lexer
870             PPI::Dumper
871             PPI::Find
872             PPI::Normal
873             PPI::Util
874             PPI::Cache
875             } );
876
877 - The cuddled-else (-ce) coding was merged with the new cuddled-block (-cb)
878   coding.  The change is backward compatible and simplifies input.  
879   The --cuddled-block-option=n (-cbo=n) flag now applies to both -ce and -cb 
880   formatting.  In fact the -cb flag is just an alias for -ce now.
881
882 - Fixed RT #124594, license text desc. changed from 'GPL-2.0+' to 'gpl_2'
883
884 - Fixed bug in which a warning about a possible code bug was issued in a
885   script with brace errors. 
886
887 - added option --notimestamp or -nts to eliminate any time stamps in output 
888   files.  This is used to prevent differences in test scripts from causing
889   failure at installation. For example, the -cscw option will put a date
890   stamp on certain closing side comments. We need to avoid this in order
891   to test this feature in an installation test.
892
893 - Fixed bug with the entab option, -et=8, in which the leading space of
894   some lines was was not entabbed.  This happened in code which was adjusted
895   for vertical alignment and in hanging side comments. Thanks to Glenn.
896
897 - Fixed RT #127633, undesirable line break after return when -baao flag is set
898
899 - Fixed RT #127035, vertical alignment. Vertical alignment has been improved 
900   in several ways.  Thanks especially to Michael Wardman and Glenn for sending 
901   helpful snippets. 
902
903   - Alignment of the =~ operators has been reactivated.  
904
905       OLD:
906       $service_profile =~ s/^\s+|\s+$//g;
907       $host_profile =~ s/^\s+|\s+$//g;
908
909       NEW:
910       $service_profile =~ s/^\s+|\s+$//g;
911       $host_profile    =~ s/^\s+|\s+$//g;
912
913   - Alignment of the // operator has been reactivated.  
914
915       OLD:
916       is( pop // 7,       7, 'pop // ... works' );
917       is( pop() // 7,     0, 'pop() // ... works' );
918       is( pop @ARGV // 7, 3, 'pop @array // ... works' );
919
920       NEW:
921       is( pop       // 7, 7, 'pop // ... works' );
922       is( pop()     // 7, 0, 'pop() // ... works' );
923       is( pop @ARGV // 7, 3, 'pop @array // ... works' );
924
925   - The rules for alignment of just two lines have been adjusted,
926     hopefully to be a little better overall.  In some cases, two 
927     lines which were previously unaligned are now aligned, and vice-versa.
928
929       OLD:
930       $expect = "1$expect" if $expect =~ /^e/i;
931       $p = "1$p" if defined $p and $p =~ /^e/i;
932
933       NEW:
934       $expect = "1$expect" if $expect =~ /^e/i;
935       $p      = "1$p"      if defined $p and $p =~ /^e/i;
936
937
938 - RT #106493; source code repository location has been added to docs; it is 
939      https://github.com/perltidy/perltidy
940
941 - The packaging for this version has changed. The Tidy.pm module is much 
942   smaller.  Supporting modules have been split out from it and placed below 
943   it in the path Perl/Tidy/*.
944
945 - A number of new installation test cases have been added. Updates are now
946   continuously tested at Travis CI against versions back to Perl 5.08.
947 </code></pre>
948
949 <h2>2018 02 20</h2>
950
951 <pre><code>- RT #124469, #124494, perltidy often making empty files.  The previous had
952   an index error causing it to fail, particularly in version 5.18 of Perl.
953
954   Please avoid version 20180219.
955 </code></pre>
956
957 <h2>2018 02 19</h2>
958
959 <pre><code>- RT #79947, cuddled-else generalization. A new flag -cb provides
960   'cuddled-else' type formatting for an arbitrary type of block chain. The
961   default is try-catch-finally, but this can be modified with the 
962   parameter -cbl. 
963
964 - Fixed RT #124298: add space after ! operator without breaking !! secret 
965   operator
966
967 - RT #123749: numerous minor improvements to the -wn flag were made.  
968
969 - Fixed a problem with convergence tests in which iterations were stopping 
970   prematurely. 
971
972 - Here doc targets for &lt;&lt;~ type here-docs may now have leading whitespace.
973
974 - Fixed RT #124354. The '-indent-only' flag was not working correctly in the 
975   previous release. A bug in version 20180101 caused extra blank lines 
976   to be output.
977
978 - Issue RT #124114. Some improvements were made in vertical alignment
979   involving 'fat commas'.
980 </code></pre>
981
982 <h2>2018 01 01</h2>
983
984 <pre><code>- Added new flag -wn (--weld-nested-containers) which addresses these issues:
985   RT #123749: Problem with promises; 
986   RT #119970: opening token stacking strange behavior;
987   RT #81853: Can't stack block braces
988
989   This option causes closely nested pairs of opening and closing containers
990   to be "welded" together and essentially be formatted as a single unit,
991   with just one level of indentation.
992
993   Since this is a new flag it is set to be "off" by default but it has given 
994   excellent results in testing. 
995
996   EXAMPLE 1, multiple blocks, default formatting:
997       do {
998           {
999               next if $x == $y;    # do something here
1000           }
1001       } until $x++ &gt; $z;
1002
1003   perltidy -wn
1004       do { {
1005           next if $x == $y;
1006       } } until $x++ &gt; $z;
1007
1008    EXAMPLE 2, three levels of wrapped function calls, default formatting:
1009           p(
1010               em(
1011                   conjug(
1012                       translate( param('verb') ), param('tense'),
1013                       param('person')
1014                   )
1015               )
1016           );
1017
1018       # perltidy -wn
1019           p( em( conjug(
1020               translate( param('verb') ),
1021               param('tense'), param('person')
1022           ) ) );
1023
1024       # EXAMPLE 3, chained method calls, default formatting:
1025       get('http://mojolicious.org')-&gt;then(
1026           sub {
1027               my $mojo = shift;
1028               say $mojo-&gt;res-&gt;code;
1029               return get('http://metacpan.org');
1030           }
1031       )-&gt;then(
1032           sub {
1033               my $cpan = shift;
1034               say $cpan-&gt;res-&gt;code;
1035           }
1036       )-&gt;catch(
1037           sub {
1038               my $err = shift;
1039               warn "Something went wrong: $err";
1040           }
1041       )-&gt;wait;
1042
1043       # perltidy -wn
1044       get('http://mojolicious.org')-&gt;then( sub {
1045           my $mojo = shift;
1046           say $mojo-&gt;res-&gt;code;
1047           return get('http://metacpan.org');
1048       } )-&gt;then( sub {
1049           my $cpan = shift;
1050           say $cpan-&gt;res-&gt;code;
1051       } )-&gt;catch( sub {
1052           my $err = shift;
1053           warn "Something went wrong: $err";
1054       } )-&gt;wait;
1055
1056
1057 - Fixed RT #114359: Missparsing of "print $x ** 0.5;
1058
1059 - Deactivated the --check-syntax flag for better security.  It will be
1060   ignored if set.  
1061
1062 - Corrected minimum perl version from 5.004 to 5.008 based on perlver
1063   report.  The change is required for coding involving wide characters.
1064
1065 - For certain severe errors, the source file will be copied directly to the
1066   output without formatting. These include ending in a quote, ending in a
1067   here doc, and encountering an unidentified character.
1068 </code></pre>
1069
1070 <h2>2017 12 14</h2>
1071
1072 <pre><code>- RT #123749, partial fix.  "Continuation indentation" is removed from lines 
1073   with leading closing parens which are part of a call chain. 
1074   For example, the call to pack() is is now outdented to the starting 
1075   indentation in the following experession:  
1076
1077       # OLD
1078       $mw-&gt;Button(
1079           -text    =&gt; "New Document",
1080           -command =&gt; \&amp;new_document
1081         )-&gt;pack(
1082           -side   =&gt; 'bottom',
1083           -anchor =&gt; 'e'
1084         );
1085
1086       # NEW
1087       $mw-&gt;Button(
1088           -text    =&gt; "New Document",
1089           -command =&gt; \&amp;new_document
1090       )-&gt;pack(
1091           -side   =&gt; 'bottom',
1092           -anchor =&gt; 'e'
1093       );
1094
1095   This modification improves readability of complex expressions, especially
1096   when the user uses the same value for continuation indentation (-ci=n) and 
1097   normal indentation (-i=n).  Perltidy was already programmed to
1098   do this but a minor bug was preventing it.
1099
1100 - RT #123774, added flag to control space between a backslash and a single or
1101   double quote, requested by Robert Rothenberg.  The issue is that lines like
1102
1103      $str1=\"string1";
1104      $str2=\'string2';
1105
1106   confuse syntax highlighters unless a space is left between the backslash and
1107   the quote.
1108
1109   The new flag to control this is -sbq=n (--space-backslash-quote=n), 
1110   where n=0 means no space, n=1 means follow existing code, n=2 means always
1111   space.  The default is n=1, meaning that a space will be retained if there
1112   is one in the source code.
1113
1114 - Fixed RT #123492, support added for indented here doc operator &lt;&lt;~ added 
1115   in v5.26.  Thanks to Chris Weyl for the report.
1116
1117 - Fixed docs; --closing-side-comment-list-string should have been just
1118   --closing-side-comment-list.  Thanks to F.Li.
1119
1120 - Added patch RT #122030] Perl::Tidy sometimes does not call binmode.
1121   Thanks to Irilis Aelae.
1122
1123 - Fixed RT #121959, PERLTIDY doesn't honor the 'three dot' notation for 
1124   locating a config file using environment variables.  Thanks to John 
1125   Wittkowski.
1126
1127 - Minor improvements to formatting, in which some additional vertical
1128   aligmnemt is done. Thanks to Keith Neargarder.
1129
1130 - RT #119588.  Vertical alignment is no longer done for // operator.
1131 </code></pre>
1132
1133 <h2>2017 05 21</h2>
1134
1135 <pre><code>- Fixed debian #862667: failure to check for perltidy.ERR deletion can lead 
1136   to overwriting arbitrary files by symlink attack. Perltidy was continuing
1137   to write files after an unlink failure.  Thanks to Don Armstrong 
1138   for a patch.
1139
1140 - Fixed RT #116344, perltidy fails on certain anonymous hash references:
1141   in the following code snippet the '?' was misparsed as a pattern 
1142   delimiter rather than a ternary operator.
1143       return ref {} ? 1 : 0;
1144
1145 - Fixed RT #113792: misparsing of a fat comma (=&gt;) right after 
1146   the __END__ or __DATA__ tokens.  These keywords were getting
1147   incorrectly quoted by the following =&gt; operator.
1148
1149 - Fixed RT #118558. Custom Getopt::Long configuration breaks parsing 
1150   of perltidyrc.  Perltidy was resetting the users configuration too soon.
1151
1152 - Fixed RT #119140, failure to parse double diamond operator.  Code to
1153   handle this new operator has been added.
1154
1155 - Fixed RT #120968.  Fixed problem where -enc=utf8 didn't work 
1156   with --backup-and-modify-in-place. Thanks to Heinz Knutzen for this patch.
1157
1158 - Fixed minor formatting issue where one-line blocks for subs with signatures 
1159   were unnecessarily broken
1160
1161 - RT #32905, patch to fix utf-8 error when output was STDOUT. 
1162
1163 - RT #79947, improved spacing of try/catch/finally blocks. Thanks to qsimpleq
1164   for a patch.
1165
1166 - Fixed #114909, Anonymous subs with signatures and prototypes misparsed as
1167   broken ternaries, in which a statement such as this was not being parsed
1168   correctly:
1169       return sub ( $fh, $out ) : prototype(*$) { ... }
1170
1171 - Implemented RT #113689, option to introduces spaces after an opening block
1172   brace and before a closing block brace. Four new optional controls are
1173   added. The first two define the minimum number of blank lines to be
1174   inserted 
1175
1176    -blao=i or --blank-lines-after-opening-block=i
1177    -blbc=i or --blank-lines-before-closing-block=i
1178
1179   where i is an integer, the number of lines (the default is 0).  
1180
1181   The second two define the types of blocks to which the first two apply 
1182
1183    -blaol=s or --blank-lines-after-opening-block-list=s
1184    -blbcl=s or --blank-lines-before-closing-block-list=s
1185
1186   where s is a string of possible block keywords (default is just 'sub',
1187   meaning a named subroutine).
1188
1189   For more information please see the documentation.
1190
1191 - The method for specifying block types for certain input parameters has
1192   been generalized to distinguish between normal named subroutines and
1193   anonymous subs.  The keyword for normal subroutines remains 'sub', and
1194   the new keyword for anonymous subs is 'asub'. 
1195
1196 - Minor documentation changes. The BUGS sections now have a link
1197   to CPAN where most open bugs and issues can be reviewed and bug reports
1198   can be submitted.  The information in the AUTHOR and CREDITS sections of
1199   the man pages have been removed from the man pages to streamline the
1200   documentation. This information is still in the source code.
1201 </code></pre>
1202
1203 <h2>2016 03 02</h2>
1204
1205 <pre><code>- RT #112534. Corrected a minor problem in which an unwanted newline
1206   was placed before the closing brace of an anonymous sub with 
1207   a signature, if it was in a list.  Thanks to Dmytro Zagashev.
1208
1209 - Corrected a minor problem in which occasional extra indentation was
1210   given to the closing brace of an anonymous sub in a list when the -lp 
1211   parameter was set.
1212 </code></pre>
1213
1214 <h2>2016 03 01</h2>
1215
1216 <pre><code> - RT #104427. Added support for signatures.
1217
1218  - RT #111512.  Changed global warning flag $^W = 1 to use warnings;
1219    Thanks to Dmytro Zagashev.
1220
1221  - RT #110297, added support for new regexp modifier /n
1222    Thanks to Dmytro Zagashev.
1223
1224  - RT #111519.  The -io (--indent-only) and -dac (--delete-all-comments)
1225    can now both be used in one pass. Thanks to Dmitry Veltishev.
1226
1227  - Patch to avoid error message with 'catch' used by TryCatch, as in
1228       catch($err){
1229          # do something
1230       }
1231    Thanks to Nick Tonkin.
1232
1233  - RT #32905, UTF-8 coding is now more robust. Thanks to qsimpleq
1234    and Dmytro for patches.
1235
1236  - RT #106885. Added string bitwise operators ^. &amp;. |. ~. ^.= &amp;.= |.=
1237
1238  - Fixed RT #107832 and #106492, lack of vertical alignment of two lines
1239    when -boc flag (break at old commas) is set.  This bug was 
1240    inadvertently introduced in previous bug fix RT #98902. 
1241
1242  - Some common extensions to Perl syntax are handled better.
1243    In particular, the following snippet is now foratted cleanly:
1244
1245      method deposit( Num $amount) {
1246          $self-&gt;balance( $self-&gt;balance + $amount );
1247      }
1248
1249    A new flag -xs (--extended-syntax) was added to enable this, and the default
1250    is to use -xs. 
1251
1252    In previous versions, and now only when -nxs is set, this snippet of code
1253    generates the following error message:
1254
1255    "syntax error at ') {', didn't see one of: case elsif for foreach given if switch unless until when while"
1256 </code></pre>
1257
1258 <h2>2015 08 15</h2>
1259
1260 <pre><code> - Fixed RT# 105484, Invalid warning about 'else' in 'switch' statement.  The
1261    warning happened if a 'case' statement did not use parens.
1262
1263  - Fixed RT# 101547, misparse of // caused error message.  Also..
1264
1265  - Fixed RT# 102371, misparse of // caused unwated space in //=
1266
1267  - Fixed RT# 100871, "silent failure of HTML Output on Windows". 
1268    Changed calls to tempfile() from:
1269      my ( $fh_tmp, $tmpfile ) = tempfile();
1270    to have the full path name:
1271      my ( $fh_tmp, $tmpfile ) = File::Temp::tempfile()
1272    because of problems in the Windows version reported by Dean Pearce.
1273
1274  - Fixed RT# 99514, calling the perltidy module multiple times with 
1275    a .perltidyrc file containing the parameter --output-line-ending 
1276    caused a crash.  This was a glitch in the memoization logic. 
1277
1278  - Fixed RT#99961, multiple lines inside a cast block caused unwanted
1279    continuation indentation.  
1280
1281  - RT# 32905, broken handling of UTF-8 strings. 
1282    A new flag -utf8 causes perltidy assume UTF-8 encoding for input and 
1283    output of an io stream.  Thanks to Sebastian Podjasek for a patch.  
1284    This feature may not work correctly in older versions of Perl. 
1285    It worked in a linux version 5.10.1 but not in a Windows version 5.8.3 (but
1286    otherwise perltidy ran correctly).
1287
1288  - Warning files now report perltidy VERSION. Suggested by John Karr.
1289
1290  - Fixed long flag --nostack-closing-tokens (-nsct has always worked though). 
1291    This was due to a typo.  This also fixed --nostack-opening-tokens to 
1292    behave correctly.  Thanks to Rob Dixon.
1293 </code></pre>
1294
1295 <h2>2014 07 11</h2>
1296
1297 <pre><code>- Fixed RT #94902: abbreviation parsing in .perltidyrc files was not
1298   working for multi-line abbreviations.  Thanks to Eric Fung for 
1299   supplying a patch. 
1300
1301 - Fixed RT #95708, misparsing of a hash when the first key was a perl
1302   keyword, causing a semicolon to be incorrectly added.
1303
1304 - Fixed RT #94338 for-loop in a parenthesized block-map.  A code block within
1305   parentheses of a map, sort, or grep function was being mistokenized.  In 
1306   rare cases this could produce in an incorrect error message.  The fix will
1307   produce some minor formatting changes.  Thanks to Daniel Trizen 
1308   discovering and documenting this.
1309
1310 - Fixed RT #94354, excess indentation for stacked tokens.  Thanks to 
1311   Colin Williams for supplying a patch.
1312
1313 - Added support for experimental postfix dereferencing notation introduced in
1314   perl 5.20. RT #96021.
1315
1316 - Updated documentation to clarify the behavior of the -io flag
1317   in response to RT #95709.  You can add -noll or -l=0 to prevent 
1318   long comments from being outdented when -io is used.
1319
1320 - Added a check to prevent a problem reported in RT #81866, where large
1321   scripts which had been compressed to a single line could not be formatted
1322   because of a check for VERSION for MakeMaker. The workaround was to 
1323   use -nvpl, but this shouldn't be necessary now.
1324
1325 - Fixed RT #96101; Closing brace of anonymous sub in a list was being
1326   indented.  For example, the closing brace of the anonymous sub below 
1327   will now be lined up with the word 'callback'.  This problem 
1328   occurred if there was no comma after the closing brace of the anonymous sub.
1329   This update may cause minor changes to formatting of code with lists 
1330   of anonymous subs, especially TK code.
1331
1332   # OLD
1333   my @menu_items = (
1334
1335       #...
1336       {
1337           path     =&gt; '/_Operate/Transcode and split',
1338           callback =&gt; sub {
1339               return 1 if not $self-&gt;project_opened;
1340               $self-&gt;comp('project')-&gt;transcode( split =&gt; 1 );
1341             }
1342       }
1343   );
1344
1345   # NEW
1346   my @menu_items = (
1347
1348       #...
1349       {
1350           path     =&gt; '/_Operate/Transcode and split',
1351           callback =&gt; sub {
1352               return 1 if not $self-&gt;project_opened;
1353               $self-&gt;comp('project')-&gt;transcode( split =&gt; 1 );
1354           }
1355       }
1356   );
1357 </code></pre>
1358
1359 <h2>2014 03 28</h2>
1360
1361 <pre><code>- Fixed RT #94190 and debian Bug #742004: perltidy.LOG file left behind.
1362   Thanks to George Hartzell for debugging this.  The problem was
1363   caused by the memoization speedup patch in version 20121207.  An
1364   unwanted flag was being set which caused a LOG to be written if 
1365   perltidy was called multiple times.
1366
1367 - New default behavior for LOG files: If the source is from an array or 
1368   string (through a call to the perltidy module) then a LOG output is only
1369   possible if a logfile stream is specified.  This is to prevent 
1370   unexpected perltidy.LOG files. 
1371
1372 - Fixed debian Bug #740670, insecure temporary file usage.  File::Temp is now
1373   used to get a temporary file.  Thanks to Don Anderson for a patch.
1374
1375 - Any -b (--backup-and-modify-in-place) flag is silently ignored when a 
1376   source stream, destination stream, or standard output is used.  
1377   This is because the -b flag may have been in a .perltidyrc file and 
1378   warnings break Test::NoWarnings.  Thanks to Marijn Brand.
1379 </code></pre>
1380
1381 <h2>2013 09 22</h2>
1382
1383 <pre><code>- Fixed RT #88020. --converge was not working with wide characters.
1384
1385 - Fixed RT #78156. package NAMESPACE VERSION syntax not accepted.
1386
1387 - First attempt to fix RT #88588.  INDEX END tag change in pod2html breaks 
1388   perltidy -html. I put in a patch which should work but I don't yet have
1389   a way of testing it.
1390 </code></pre>
1391
1392 <h2>2013 08 06</h2>
1393
1394 <pre><code>- Fixed RT #87107, spelling
1395 </code></pre>
1396
1397 <h2>2013 08 05</h2>
1398
1399 <pre><code>- Fixed RT #87502, incorrect of parsing of smartmatch before hash brace
1400
1401 - Added feature request RT #87330, trim whitespace after POD.
1402   The flag -trp (--trim-pod) will trim trailing whitespace from lines of POD
1403 </code></pre>
1404
1405 <h2>2013 07 17</h2>
1406
1407 <pre><code>- Fixed RT #86929, #86930, missing lhs of assignment.
1408
1409 - Fixed RT #84922, moved pod from Tidy.pm into Tidy.pod
1410 </code></pre>
1411
1412 <h2>2012 12 07</h2>
1413
1414 <pre><code>- The flag -cab=n or --comma-arrow-breakpoints=n has been generalized
1415   to give better control over breaking open short containers.  The
1416   possible values are now:
1417
1418     n=0 break at all commas after =&gt;  
1419     n=1 stable: break at all commas after =&gt; if container is open,
1420         EXCEPT FOR one-line containers
1421     n=2 break at all commas after =&gt;, BUT try to form the maximum
1422         maximum one-line container lengths
1423     n=3 do not treat commas after =&gt; specially at all 
1424     n=4 break everything: like n=0 but also break a short container with
1425         a =&gt; not followed by a comma
1426     n=5 stable: like n=1 but ALSO break at open one-line containers (default)
1427
1428   New values n=4 and n=5 have been added to allow short blocks to be
1429   broken open.  The new default is n=5, stable.  It should more closely
1430   follow the breaks in the input file, and previously formatted code
1431   should remain unchanged.  If this causes problems use -cab=1 to recover 
1432   the former behavior.  Thanks to Tony Maszeroski for the suggestion.
1433
1434   To illustrate the need for the new options, if perltidy is given
1435   the following code, then the old default (-cab=1) was to close up 
1436   the 'index' container even if it was open in the source.  The new 
1437   default (-cab=5) will keep it open if it was open in the source.
1438
1439    our $fancypkg = {
1440        'ALL' =&gt; {
1441            'index' =&gt; {
1442                'key' =&gt; 'value',
1443            },
1444            'alpine' =&gt; {
1445                'one'   =&gt; '+',
1446                'two'   =&gt; '+',
1447                'three' =&gt; '+',
1448            },
1449        }
1450    };
1451
1452 - New debug flag --memoize (-mem).  This version contains a 
1453   patch supplied by Jonathan Swartz which can significantly speed up
1454   repeated calls to Perl::Tidy::perltidy in a single process by caching
1455   the result of parsing the formatting parameters.  A factor of up to 10
1456   speedup was achieved for masontidy (https://metacpan.org/module/masontidy).
1457   The memoization patch is on by default but can be deactivated for 
1458   testing with -nmem (or --no-memoize).
1459
1460 - New flag -tso (--tight-secret-operators) causes certain perl operator
1461   sequences (secret operators) to be formatted "tightly" (without spaces).  
1462   The most common of these are 0 +  and + 0 which become 0+ and +0.  The
1463   operators currently modified by this flag are: 
1464        =( )=  0+  +0  ()x!! ~~&lt;&gt;  ,=&gt;
1465   Suggested by by Philippe Bruhat. See https://metacpan.org/module/perlsecret
1466   This flag is off by default.
1467
1468 - New flag -vmll (--variable-maximum-line-length) makes the maximum
1469   line length increase with the nesting depth of a line of code.  
1470   Basically, it causes the length of leading whitespace to be ignored when
1471   setting line breaks, so the formatting of a block of code is independent
1472   of its nesting depth.  Try this option if you have deeply nested 
1473   code or data structures, perhaps in conjunction with the -wc flag
1474   described next.  The default is not todo this.
1475
1476 - New flag -wc=n (--whitespace-cycle=n) also addresses problems with
1477   very deeply nested code and data structures.  When this parameter is
1478   used and the nesting depth exceeds the value n, the leading whitespace 
1479   will be reduced and start at 1 again.  The result is that deeply
1480   nested blocks of code will shift back to the left. This occurs cyclically 
1481   to any nesting depth.  This flag may be used either with or without -vmll.
1482   The default is not to use this (-wc=0).
1483
1484 - Fixed RT #78764, error parsing smartmatch operator followed by anonymous
1485   hash or array and then a ternary operator; two examples:
1486
1487    qr/3/ ~~ ['1234'] ? 1 : 0;
1488    map { $_ ~~ [ '0', '1' ] ? 'x' : 'o' } @a;
1489
1490 - Fixed problem with specifying spaces around arrows using -wls='-&gt;'
1491   and -wrs='-&gt;'.  Thanks to Alain Valleton for documenting this problem. 
1492
1493 - Implemented RT #53183, wishlist, lines of code with the same indentation
1494   level which are contained with multiple stacked opening and closing tokens
1495   (requested with flags -sot -sct) now have reduced indentation.  
1496
1497    # Default
1498    $sender-&gt;MailMsg(
1499        {
1500            to      =&gt; $addr,
1501            subject =&gt; $subject,
1502            msg     =&gt; $body
1503        }
1504    );
1505
1506    # OLD: perltidy -sot -sct 
1507    $sender-&gt;MailMsg( {
1508            to      =&gt; $addr,
1509            subject =&gt; $subject,
1510            msg     =&gt; $body
1511    } );
1512
1513    # NEW: perltidy -sot -sct 
1514    $sender-&gt;MailMsg( {
1515        to      =&gt; $addr,
1516        subject =&gt; $subject,
1517        msg     =&gt; $body
1518    } );
1519
1520 - New flag -act=n (--all-containers-tightness=n) is an abbreviation for
1521   -pt=n -sbt=n -bt=n -bbt=n, where n=0,1, or 2.  It simplifies input when all
1522   containers have the same tightness. Using the same example:
1523
1524    # NEW: perltidy -sot -sct -act=2
1525    $sender-&gt;MailMsg({
1526        to      =&gt; $addr,
1527        subject =&gt; $subject,
1528        msg     =&gt; $body
1529    });
1530
1531 - New flag -sac (--stack-all-containers) is an abbreviation for -sot -sct
1532   This is part of wishlist item RT #53183. Using the same example again:
1533
1534    # NEW: perltidy -sac -act=2
1535    $sender-&gt;MailMsg({
1536        to      =&gt; $addr,
1537        subject =&gt; $subject,
1538        msg     =&gt; $body
1539    });
1540
1541  - new flag -scbb (--stack-closing-block-brace) causes isolated closing 
1542    block braces to stack as in the following example. (Wishlist item RT#73788)
1543
1544    DEFAULT:
1545    for $w1 (@w1) {
1546        for $w2 (@w2) {
1547            for $w3 (@w3) {
1548                for $w4 (@w4) {
1549                    push( @lines, "$w1 $w2 $w3 $w4\n" );
1550                }
1551            }
1552        }
1553    }
1554
1555    perltidy -scbb:
1556    for $w1 (@w1) {
1557        for $w2 (@w2) {
1558            for $w3 (@w3) {
1559                for $w4 (@w4) {
1560                    push( @lines, "$w1 $w2 $w3 $w4\n" );
1561                } } } }
1562
1563   There is, at present, no flag to place these closing braces at the end
1564   of the previous line. It seems difficult to develop good rules for 
1565   doing this for a wide variety of code and data structures.
1566
1567 - Parameters defining block types may use a wildcard '*' to indicate
1568   all block types.  Previously it was not possible to include bare blocks.
1569
1570 - A flag -sobb (--stack-opening-block-brace) has been introduced as an
1571   alias for -bbvt=2 -bbvtl='*'.  So for example the following test code:
1572
1573   {{{{{{{ $testing }}}}}}}
1574
1575   cannot be formatted as above but can at least be kept vertically compact 
1576   using perltidy -sobb -scbb
1577
1578   {   {   {   {   {   {   {   $testing
1579                           } } } } } } }
1580
1581   Or even, perltidy -sobb -scbb -i=1 -bbt=2
1582   {{{{{{{$testing
1583         }}}}}}}
1584
1585
1586 - Error message improved for conflicts due to -pbp; thanks to Djun Kim.
1587
1588 - Fixed RT #80645, error parsing special array name '@$' when used as 
1589   @{$} or $#{$}
1590
1591 - Eliminated the -chk debug flag which was included in version 20010406 to
1592   do a one-time check for a bug with multi-line quotes.  It has not been
1593   needed since then.
1594
1595 - Numerous other minor formatting improvements.
1596 </code></pre>
1597
1598 <h2>2012 07 14</h2>
1599
1600 <pre><code>- Added flag -iscl (--ignore-side-comment-lengths) which causes perltidy 
1601   to ignore the length of side comments when setting line breaks, 
1602   RT #71848.  The default is to include the length of side comments when
1603   breaking lines to stay within the length prescribed by the -l=n
1604   maximum line length parameter.  For example,
1605
1606     Default behavior on a single line with long side comment:
1607        $vmsfile =~ s/;[\d\-]*$//
1608          ;    # Clip off version number; we can use a newer version as well
1609
1610     perltidy -iscl leaves the line intact:
1611
1612        $vmsfile =~ s/;[\d\-]*$//; # Clip off version number; we can use a newer version as well
1613
1614 - Fixed RT #78182, side effects with STDERR.  Error handling has been
1615   revised and the documentation has been updated.  STDERR can now be 
1616   redirected to a string reference, and perltidy now returns an 
1617   error flag instead of calling die when input errors are detected. 
1618   If the error flag is set then no tidied output was produced.
1619   See man Perl::Tidy for an example.
1620
1621 - Fixed RT #78156, erroneous warning message for package VERSION syntax.
1622
1623 - Added abbreviations -conv (--converge) to simplify iteration control.
1624   -conv is equivalent to -it=4 and will insure that the tidied code is
1625   converged to its final state with the minimum number of iterations.
1626
1627 - Minor formatting modifications have been made to insure convergence.
1628
1629 - Simplified and hopefully improved the method for guessing the starting 
1630   indentation level of entabbed code.  Added flag -dt=n (--default_tabsize=n) 
1631   which might be helpful if the guessing method does not work well for
1632   some editors.
1633
1634 - Added support for stacked labels, upper case X/B in hex and binary, and
1635   CORE:: namespace.
1636
1637 - Eliminated warning messages for using keyword names as constants.
1638 </code></pre>
1639
1640 <h2>2012 07 01</h2>
1641
1642 <pre><code>- Corrected problem introduced by using a chomp on scalar references, RT #77978
1643
1644 - Added support for Perl 5.14 package block syntax, RT #78114.
1645
1646 - A convergence test is made if three or more iterations are requested with
1647   the -it=n parameter to avoid wasting computer time.  Several hundred Mb of
1648   code gleaned from the internet were searched with the results that: 
1649    - It is unusual for two iterations to be required unless a major 
1650      style change is being made. 
1651    - Only one case has been found where three iterations were required.  
1652    - No cases requiring four iterations have been found with this version.
1653   For the previous version several cases where found the results could
1654   oscillate between two semi-stable states. This version corrects this.
1655
1656   So if it is important that the code be converged it is okay to set -it=4
1657   with this version and it will probably stop after the second iteration.
1658
1659 - Improved ability to identify and retain good line break points in the
1660   input stream, such as at commas and equals. You can always tell 
1661   perltidy to ignore old breakpoints with -iob.  
1662
1663 - Fixed glitch in which a terminal closing hash brace followed by semicolon
1664   was not outdented back to the leading line depth like other closing
1665   tokens.  Thanks to Keith Neargarder for noting this.
1666
1667     OLD:
1668        my ( $pre, $post ) = @{
1669            {
1670                "pp_anonlist" =&gt; [ "[", "]" ],
1671                "pp_anonhash" =&gt; [ "{", "}" ]
1672            }-&gt;{ $kid-&gt;ppaddr }
1673          };   # terminal brace
1674
1675     NEW:
1676        my ( $pre, $post ) = @{
1677            {
1678                "pp_anonlist" =&gt; [ "[", "]" ],
1679                "pp_anonhash" =&gt; [ "{", "}" ]
1680            }-&gt;{ $kid-&gt;ppaddr }
1681        };    # terminal brace
1682
1683 - Removed extra indentation given to trailing 'if' and 'unless' clauses 
1684   without parentheses because this occasionally produced undesirable 
1685   results.  This only applies where parens are not used after the if or
1686   unless.
1687
1688    OLD:
1689        return undef
1690          unless my ( $who, $actions ) =
1691              $clause =~ /^($who_re)((?:$action_re)+)$/o; 
1692
1693    NEW:
1694        return undef
1695          unless my ( $who, $actions ) =
1696          $clause =~ /^($who_re)((?:$action_re)+)$/o;
1697 </code></pre>
1698
1699 <h2>2012 06 19</h2>
1700
1701 <pre><code>- Updated perltidy to handle all quote modifiers defined for perl 5 version 16.
1702
1703 - Side comment text in perltidyrc configuration files must now begin with
1704   at least one space before the #.  Thus:
1705
1706   OK:
1707     -l=78 # Max line width is 78 cols
1708   BAD: 
1709     -l=78# Max line width is 78 cols
1710
1711   This is probably true of almost all existing perltidyrc files, 
1712   but if you get an error message about bad parameters
1713   involving a '#' the first time you run this version, please check the side
1714   comments in your perltidyrc file, and add a space before the # if necessary.
1715   You can quickly see the contents your perltidyrc file, if any, with the
1716   command:
1717
1718     perltidy -dpro
1719
1720   The reason for this change is that some parameters naturally involve
1721   the # symbol, and this can get interpreted as a side comment unless the
1722   parameter is quoted.  For example, to define -sphb=# it used to be necessary
1723   to write
1724     -sbcp='#'
1725   to keep the # from becoming part of a comment.  This was causing 
1726   trouble for new users.  Now it can also be written without quotes: 
1727     -sbcp=#
1728
1729 - Fixed bug in processing some .perltidyrc files containing parameters with
1730   an opening brace character, '{'.  For example the following was
1731   incorrectly processed:
1732      --static-block-comment-prefix="^#{2,}[^\s#]"
1733   Thanks to pdagosto.
1734
1735 - Added flag -boa (--break-at-old-attribute-breakpoints) which retains
1736   any existing line breaks at attribute separation ':'. This is now the
1737   default, use -nboa to deactivate.  Thanks to Daphne Phister for the patch.  
1738   For example, given the following code, the line breaks at the ':'s will be
1739   retained:
1740
1741                    my @field
1742                      : field
1743                      : Default(1)
1744                      : Get('Name' =&gt; 'foo') : Set('Name');
1745
1746   whereas the previous version would have output a single line.  If
1747   the attributes are on a single line then they will remain on a single line.
1748
1749 - Added new flags --blank-lines-before-subs=n (-blbs=n) and
1750   --blank-lines-before-packages=n (-blbp=n) to put n blank lines before
1751   subs and packages.  The old flag -bbs is now equivalent to -blbs=1 -blbp=1.
1752   and -nbbs is equivalent to -blbs=0 -blbp=0. Requested by M. Schwern and
1753   several others.
1754
1755 - Added feature -nsak='*' meaning no space between any keyword and opening 
1756   paren.  This avoids listing entering a long list of keywords.  Requested
1757   by M. Schwern.
1758
1759 - Added option to delete a backup of original file with in-place-modify (-b)
1760   if there were no errors.  This can be requested with the flag -bext='/'.  
1761   See documentation for details.  Requested by M. Schwern and others.
1762
1763 - Fixed bug where the module postfilter parameter was not applied when -b 
1764   flag was used.  This was discovered during testing.
1765
1766 - Fixed in-place-modify (-b) to work with symbolic links to source files.
1767   Thanks to Ted Johnson.
1768
1769 - Fixed bug where the Perl::Tidy module did not allow -b to be used 
1770   in some cases.
1771
1772 - No extra blank line is added before a comment which follows
1773   a short line ending in an opening token, for example like this:
1774    OLD:
1775            if (
1776
1777                # unless we follow a blank or comment line
1778                $last_line_leading_type !~ /^[#b]$/
1779                ...
1780
1781    NEW:
1782            if (
1783                # unless we follow a blank or comment line
1784                $last_line_leading_type !~ /^[#b]$/
1785                ...
1786
1787    The blank is not needed for readability in these cases because there
1788    already is already space above the comment.  If a blank already 
1789    exists there it will not be removed, so this change should not 
1790    change code which has previously been formatted with perltidy. 
1791    Thanks to R.W.Stauner.
1792
1793 - Likewise, no extra blank line is added above a comment consisting of a
1794   single #, since nothing is gained in readability.
1795
1796 - Fixed error in which a blank line was removed after a #&gt;&gt;&gt; directive. 
1797   Thanks to Ricky Morse.
1798
1799 - Unnecessary semicolons after given/when/default blocks are now removed.
1800
1801 - Fixed bug where an unwanted blank line could be added before
1802   pod text in __DATA__ or __END__ section.  Thanks to jidani.
1803
1804 - Changed exit flags from 1 to 0 to indicate success for -help, -version, 
1805   and all -dump commands.  Also added -? as another way to dump the help.
1806   Requested by Keith Neargarder.
1807
1808 - Fixed bug where .ERR and .LOG files were not written except for -it=2 or more
1809
1810 - Fixed bug where trailing blank lines at the end of a file were dropped when
1811   -it&gt;1.
1812
1813 - Fixed bug where a line occasionally ended with an extra space. This reduces
1814   rhe number of instances where a second iteration gives a result different
1815   from the first. 
1816
1817 - Updated documentation to note that the Tidy.pm module &lt;stderr&gt; parameter may
1818   not be a reference to SCALAR or ARRAY; it must be a file.
1819
1820 - Syntax check with perl now work when the Tidy.pm module is processing
1821   references to arrays and strings.  Thanks to Charles Alderman.
1822
1823 - Zero-length files are no longer processed due to concerns for data loss
1824   due to side effects in some scenarios.
1825
1826 - block labels, if any, are now included in closing side comment text
1827   when the -csc flag is used.  Suggested by Aaron.  For example, 
1828   the label L102 in the following block is now included in the -csc text:
1829
1830      L102: for my $i ( 1 .. 10 ) {
1831        ...
1832      } ## end L102: for my $i ( 1 .. 10 )
1833 </code></pre>
1834
1835 <h2>2010 12 17</h2>
1836
1837 <pre><code>- added new flag -it=n or --iterations=n
1838   This flag causes perltidy to do n complete iterations.  
1839   For most purposes the default of n=1 should be satisfactory.  However n=2
1840   can be useful when a major style change is being made, or when code is being
1841   beautified on check-in to a source code control system.  The run time will be
1842   approximately proportional to n, and it should seldom be necessary to use a
1843   value greater than n=2.  Thanks to Jonathan Swartz
1844
1845 - A configuration file pathname begins with three dots, e.g.
1846   ".../.perltidyrc", indicates that the file should be searched for starting
1847   in the current directory and working upwards. This makes it easier to have
1848   multiple projects each with their own .perltidyrc in their root directories.
1849   Thanks to Jonathan Swartz for this patch.
1850
1851 - Added flag --notidy which disables all formatting and causes the input to be
1852   copied unchanged.  This can be useful in conjunction with hierarchical
1853   F&lt;.perltidyrc&gt; files to prevent unwanted tidying.
1854   Thanks to Jonathan Swartz for this patch.
1855
1856 - Added prefilters and postfilters in the call to the Tidy.pm module.
1857   Prefilters and postfilters. The prefilter is a code reference that 
1858   will be applied to the source before tidying, and the postfilter 
1859   is a code reference to the result before outputting.  
1860
1861   Thanks to Jonathan Swartz for this patch.  He writes:
1862   This is useful for all manner of customizations. For example, I use
1863   it to convert the 'method' keyword to 'sub' so that perltidy will work for
1864   Method::Signature::Simple code:
1865
1866   Perl::Tidy::perltidy(
1867      prefilter =&gt; sub { $_ = $_[0]; s/^method (.*)/sub $1 \#__METHOD/gm; return $_ },
1868      postfilter =&gt; sub { $_ = $_[0]; s/^sub (.*?)\s* \#__METHOD/method $1/gm; return $_ }
1869   );
1870
1871 - The starting indentation level of sections of code entabbed with -et=n
1872   is correctly guessed if it was also produced with the same -et=n flag.  This
1873   keeps the indentation stable on repeated formatting passes within an editor.
1874   Thanks to Sam Kington and Glenn.
1875
1876 - Functions with prototype '&amp;' had a space between the function and opening
1877   peren.  This space now only occurs if the flag --space-function-paren (-sfp)
1878   is set.  Thanks to Zrajm Akfohg.
1879
1880 - Patch to never put spaces around a bare word in braces beginning with ^ as in:
1881     my $before = ${^PREMATCH};
1882   even if requested with the -bt=0 flag because any spaces cause a syntax error in perl.
1883   Thanks to Fabrice Dulanoy.
1884 </code></pre>
1885
1886 <h2>2009 06 16</h2>
1887
1888 <pre><code>- Allow configuration file to be 'perltidy.ini' for Windows systems.
1889   i.e. C:\Documents and Settings\User\perltidy.ini
1890   and added documentation for setting configuation file under Windows in man
1891   page.  Thanks to Stuart Clark.
1892
1893 - Corrected problem of unwanted semicolons in hash ref within given/when code.
1894  Thanks to Nelo Onyiah.
1895
1896 - added new flag -cscb or --closing-side-comments-balanced
1897  When using closing-side-comments, and the closing-side-comment-maximum-text
1898  limit is exceeded, then the comment text must be truncated.  Previous
1899  versions of perltidy terminate with three dots, and this can still be
1900  achieved with -ncscb:
1901
1902   perltidy -csc -ncscb
1903
1904   } ## end foreach my $foo (sort { $b cmp $a ...
1905
1906  However this causes a problem with older editors which cannot recognize
1907  comments or are not configured to doso because they cannot "bounce" around in
1908  the text correctly.  The B&lt;-cscb&gt; flag tries to help them by 
1909  appending appropriate terminal balancing structure:
1910
1911   perltidy -csc -cscb
1912
1913   } ## end foreach my $foo (sort { $b cmp $a ... })
1914
1915  Since there is much to be gained and little to be lost by doing this,
1916  the default is B&lt;-cscb&gt;.  Use B&lt;-ncscb&gt; if you do not want this.
1917
1918  Thanks to Daniel Becker for suggesting this option.
1919
1920 - After an isolated closing eval block the continuation indentation will be
1921   removed so that the braces line up more like other blocks.  Thanks to Yves Orton.
1922
1923 OLD:
1924    eval {
1925        #STUFF;
1926        1;    # return true
1927      }  
1928      or do {
1929        #handle error
1930      };
1931
1932 NEW:
1933    eval {
1934        #STUFF;
1935        1;    # return true
1936    } or do {
1937        #handle error
1938    };
1939
1940 -A new flag -asbl (or --opening-anonymous-sub-brace-on-new-line) has
1941  been added to put the opening brace of anonymous sub's on a new line,
1942  as in the following snippet:
1943
1944    my $code = sub
1945    {
1946        my $arg = shift;
1947        return $arg-&gt;(@_);
1948    };
1949
1950  This was not possible before because the -sbl flag only applies to named
1951  subs. Thanks to Benjamin Krupp.
1952
1953 -Fix tokenization bug with the following snippet
1954   print 'hi' if { x =&gt; 1, }-&gt;{x};
1955  which resulted in a semicolon being added after the comma.  The workaround
1956  was to use -nasc, but this is no longer necessary.  Thanks to Brian Duggan. 
1957
1958 -Fixed problem in which an incorrect error message could be triggered
1959 by the (unusual) combination of parameters  -lp -i=0 -l=2 -ci=0 for
1960 example.  Thanks to Richard Jelinek.
1961
1962 -A new flag --keep-old-blank-lines=n has been added to
1963 give more control over the treatment of old blank lines in
1964 a script.  The manual has been revised to discuss the new
1965 flag and clarify the treatment of old blank lines.  Thanks
1966 to Oliver Schaefer.
1967 </code></pre>
1968
1969 <h2>2007 12 05</h2>
1970
1971 <pre><code>-Improved support for perl 5.10: New quote modifier 'p', new block type UNITCHECK, 
1972 new keyword break, improved formatting of given/when.
1973
1974 -Corrected tokenization bug of something like $var{-q}.
1975
1976 -Numerous minor formatting improvements.
1977
1978 -Corrected list of operators controlled by -baao -bbao to include
1979   . : ? &amp;&amp; || and or err xor
1980
1981 -Corrected very minor error in log file involving incorrect comment
1982 regarding need for upper case of labels.  
1983
1984 -Fixed problem where perltidy could run for a very long time
1985 when given certain non-perl text files.
1986
1987 -Line breaks in un-parenthesized lists now try to follow
1988 line breaks in the input file rather than trying to fill
1989 lines.  This usually works better, but if this causes
1990 trouble you can use -iob to ignore any old line breaks.
1991 Example for the following input snippet:
1992
1993    print
1994    "conformability (Not the same dimension)\n",
1995    "\t", $have, " is ", text_unit($hu), "\n",
1996    "\t", $want, " is ", text_unit($wu), "\n",
1997    ;
1998
1999  OLD:
2000    print "conformability (Not the same dimension)\n", "\t", $have, " is ",
2001      text_unit($hu), "\n", "\t", $want, " is ", text_unit($wu), "\n",;
2002
2003  NEW:
2004    print "conformability (Not the same dimension)\n",
2005      "\t", $have, " is ", text_unit($hu), "\n",
2006      "\t", $want, " is ", text_unit($wu), "\n",
2007      ;
2008 </code></pre>
2009
2010 <h2>2007 08 01</h2>
2011
2012 <pre><code>-Added -fpsc option (--fixed-position-side-comment). Thanks to Ueli Hugenschmidt. 
2013 For example -fpsc=40 tells perltidy to put side comments in column 40
2014 if possible.  
2015
2016 -Added -bbao and -baao options (--break-before-all-operators and
2017 --break-after-all-operators) to simplify command lines and configuration
2018 files.  These define an initial preference for breaking at operators which can
2019 be modified with -wba and -wbb flags.  For example to break before all operators
2020 except an = one could use --bbao -wba='=' rather than listing every
2021 single perl operator (except =) on a -wbb flag.
2022
2023 -Added -kis option (--keep-interior-semicolons).  Use the B&lt;-kis&gt; flag
2024 to prevent breaking at a semicolon if there was no break there in the
2025 input file.  To illustrate, consider the following input lines:
2026
2027    dbmclose(%verb_delim); undef %verb_delim;
2028    dbmclose(%expanded); undef %expanded;
2029    dbmclose(%global); undef %global;
2030
2031 Normally these would be broken into six lines, but 
2032 perltidy -kis gives:
2033
2034    dbmclose(%verb_delim); undef %verb_delim;
2035    dbmclose(%expanded);   undef %expanded;
2036    dbmclose(%global);     undef %global;
2037
2038 -Improved formatting of complex ternary statements, with indentation
2039 of nested statements.  
2040  OLD:
2041    return defined( $cw-&gt;{Selected} )
2042      ? (wantarray)
2043      ? @{ $cw-&gt;{Selected} }
2044      : $cw-&gt;{Selected}[0]
2045      : undef;
2046
2047  NEW:
2048    return defined( $cw-&gt;{Selected} )
2049      ? (wantarray)
2050          ? @{ $cw-&gt;{Selected} }
2051          : $cw-&gt;{Selected}[0]
2052      : undef;
2053
2054 -Text following un-parenthesized if/unless/while/until statements get a
2055 full level of indentation.  Suggested by Jeff Armstrong and others.
2056 OLD:
2057    return $ship-&gt;chargeWeapons("phaser-canon")
2058      if $encounter-&gt;description eq 'klingon'
2059      and $ship-&gt;firepower &gt;= $encounter-&gt;firepower
2060      and $location-&gt;status ne 'neutral';
2061 NEW:
2062    return $ship-&gt;chargeWeapons("phaser-canon")
2063      if $encounter-&gt;description eq 'klingon'
2064          and $ship-&gt;firepower &gt;= $encounter-&gt;firepower
2065          and $location-&gt;status ne 'neutral';
2066 </code></pre>
2067
2068 <h2>2007 05 08</h2>
2069
2070 <pre><code>-Fixed bug where #line directives were being indented.  Thanks to
2071 Philippe Bruhat.
2072 </code></pre>
2073
2074 <h2>2007 05 04</h2>
2075
2076 <pre><code>-Fixed problem where an extra blank line was added after an =cut when either
2077 (a) the =cut started (not stopped) a POD section, or (b) -mbl &gt; 1. 
2078 Thanks to J. Robert Ray and Bill Moseley.
2079 </code></pre>
2080
2081 <h2>2007 04 24</h2>
2082
2083 <pre><code>-ole (--output-line-ending) and -ple (--preserve-line-endings) should
2084 now work on all systems rather than just unix systems. Thanks to Dan
2085 Tyrell.
2086
2087 -Fixed problem of a warning issued for multiple subs for BEGIN subs
2088 and other control subs. Thanks to Heiko Eissfeldt.
2089
2090 -Fixed problem where no space was introduced between a keyword or
2091 bareword and a colon, such as:
2092
2093 ( ref($result) eq 'HASH' &amp;&amp; !%$result ) ? undef: $result;
2094
2095 Thanks to Niek.
2096
2097 -Added a utility program 'break_long_quotes.pl' to the examples directory of
2098 the distribution.  It breaks long quoted strings into a chain of concatenated
2099 sub strings no longer than a selected length.  Suggested by Michael Renner as
2100 a perltidy feature but was judged to be best done in a separate program.
2101
2102 -Updated docs to remove extra &lt; and &gt;= from list of tokens 
2103 after which breaks are made by default.  Thanks to Bob Kleemann.
2104
2105 -Removed improper uses of $_ to avoid conflicts with external calls, giving
2106 error message similar to:
2107    Modification of a read-only value attempted at 
2108    /usr/share/perl5/Perl/Tidy.pm line 6907.
2109 Thanks to Michael Renner.
2110
2111 -Fixed problem when errorfile was not a plain filename or filehandle
2112 in a call to Tidy.pm.  The call
2113 perltidy(source =&gt; \$input, destination =&gt; \$output, errorfile =&gt; \$err);
2114 gave the following error message:
2115  Not a GLOB reference at /usr/share/perl5/Perl/Tidy.pm line 3827.
2116 Thanks to Michael Renner and Phillipe Bruhat.
2117
2118 -Fixed problem where -sot would not stack an opening token followed by
2119 a side comment.  Thanks to Jens Schicke.
2120
2121 -improved breakpoints in complex math and other long statements. Example:
2122 OLD:
2123    return
2124      log($n) + 0.577215664901532 + ( 1 / ( 2 * $n ) ) -
2125      ( 1 / ( 12 * ( $n**2 ) ) ) + ( 1 / ( 120 * ( $n**4 ) ) );
2126 NEW:
2127    return
2128      log($n) + 0.577215664901532 +
2129      ( 1 / ( 2 * $n ) ) -
2130      ( 1 / ( 12 * ( $n**2 ) ) ) +
2131      ( 1 / ( 120 * ( $n**4 ) ) );
2132
2133 -more robust vertical alignment of complex terminal else blocks and ternary
2134 statements.
2135 </code></pre>
2136
2137 <h2>2006 07 19</h2>
2138
2139 <pre><code>-Eliminated bug where a here-doc invoked through an 'e' modifier on a pattern
2140 replacement text was not recognized.  The tokenizer now recursively scans
2141 replacement text (but does not reformat it).
2142
2143 -improved vertical alignment of terminal else blocks and ternary statements.
2144  Thanks to Chris for the suggestion. 
2145
2146  OLD:
2147    if    ( IsBitmap() ) { return GetBitmap(); }
2148    elsif ( IsFiles() )  { return GetFiles(); }
2149    else { return GetText(); }
2150
2151  NEW:
2152    if    ( IsBitmap() ) { return GetBitmap(); }
2153    elsif ( IsFiles() )  { return GetFiles(); }
2154    else                 { return GetText(); }
2155
2156  OLD:
2157    $which_search =
2158        $opts{"t"} ? 'title'
2159      : $opts{"s"} ? 'subject'
2160      : $opts{"a"} ? 'author'
2161      : 'title';
2162
2163  NEW:
2164    $which_search =
2165        $opts{"t"} ? 'title'
2166      : $opts{"s"} ? 'subject'
2167      : $opts{"a"} ? 'author'
2168      :              'title';
2169
2170 -improved indentation of try/catch blocks and other externally defined
2171 functions accepting a block argument.  Thanks to jae.
2172
2173 -Added support for Perl 5.10 features say and smartmatch.
2174
2175 -Added flag -pbp (--perl-best-practices) as an abbreviation for parameters
2176 suggested in Damian Conway's "Perl Best Practices".  -pbp is the same as:
2177
2178    -l=78 -i=4 -ci=4 -st -se -vt=2 -cti=0 -pt=1 -bt=1 -sbt=1 -bbt=1 -nsfs -nolq
2179    -wbb="% + - * / x != == &gt;= &lt;= =~ !~ &lt; &gt; | &amp; &gt;= &lt; = 
2180          **= += *= &amp;= &lt;&lt;= &amp;&amp;= -= /= |= &gt;&gt;= ||= .= %= ^= x="
2181
2182  Please note that the -st here restricts input to standard input; use
2183  -nst if necessary to override.
2184
2185 -Eliminated some needless breaks at equals signs in -lp indentation.
2186
2187    OLD:
2188        $c =
2189          Math::Complex-&gt;make(LEFT + $x * (RIGHT - LEFT) / SIZE,
2190                              TOP + $y * (BOTTOM - TOP) / SIZE);
2191    NEW:
2192        $c = Math::Complex-&gt;make(LEFT + $x * (RIGHT - LEFT) / SIZE,
2193                                 TOP + $y * (BOTTOM - TOP) / SIZE);
2194
2195 A break at an equals is sometimes useful for preventing complex statements 
2196 from hitting the line length limit.  The decision to do this was 
2197 over-eager in some cases and has been improved.  Thanks to Royce Reece.
2198
2199 -qw quotes contained in braces, square brackets, and parens are being
2200 treated more like those containers as far as stacking of tokens.  Also
2201 stack of closing tokens ending ');' will outdent to where the ');' would
2202 have outdented if the closing stack is matched with a similar opening stack.
2203
2204  OLD: perltidy -soc -sct
2205    __PACKAGE__-&gt;load_components(
2206        qw(
2207          PK::Auto
2208          Core
2209          )
2210    );
2211  NEW: perltidy -soc -sct
2212    __PACKAGE__-&gt;load_components( qw(
2213          PK::Auto
2214          Core
2215    ) );
2216  Thanks to Aran Deltac
2217
2218 -Eliminated some undesirable or marginally desirable vertical alignments.
2219 These include terminal colons, opening braces, and equals, and particularly
2220 when just two lines would be aligned.
2221
2222 OLD:
2223    my $accurate_timestamps = $Stamps{lnk};
2224    my $has_link            = 
2225        ...
2226 NEW:
2227    my $accurate_timestamps = $Stamps{lnk};
2228    my $has_link =
2229
2230 -Corrected a problem with -mangle in which a space would be removed
2231 between a keyword and variable beginning with ::.
2232 </code></pre>
2233
2234 <h2>2006 06 14</h2>
2235
2236 <pre><code>-Attribute argument lists are now correctly treated as quoted strings
2237 and not formatted.  This is the most important update in this version.
2238 Thanks to Borris Zentner, Greg Ferguson, Steve Kirkup.
2239
2240 -Updated to recognize the defined or operator, //, to be released in Perl 10.
2241 Thanks to Sebastien Aperghis-Tramoni.
2242
2243 -A useful utility perltidyrc_dump.pl is included in the examples section.  It
2244 will read any perltidyrc file and write it back out in a standard format
2245 (though comments are lost).
2246
2247 -Added option to have perltidy read and return a hash with the contents of a
2248 perltidyrc file.  This may be used by Leif Eriksen's tidyview code.  This
2249 feature is used by the demonstration program 'perltidyrc_dump.pl' in the
2250 examples directory.
2251
2252 -Improved error checking in perltidyrc files.  Unknown bare words were not
2253 being caught.
2254
2255 -The --dump-options parameter now dumps parameters in the format required by a
2256 perltidyrc file.
2257
2258 -V-Strings with underscores are now recognized.
2259 For example: $v = v1.2_3; 
2260
2261 -cti=3 option added which gives one extra indentation level to closing 
2262 tokens always.  This provides more predictable closing token placement
2263 than cti=2.  If you are using cti=2 you might want to try cti=3.
2264
2265 -To identify all left-adjusted comments as static block comments, use C&lt;-sbcp='^#'&gt;.
2266
2267 -New parameters -fs, -fsb, -fse added to allow sections of code between #&lt;&lt;&lt;
2268 and #&gt;&gt;&gt; to be passed through verbatim. This is enabled by default and turned
2269 off by -nfs.  Flags -fsb and -fse allow other beginning and ending markers.
2270 Thanks to Wolfgang Werner and Marion Berryman for suggesting this.  
2271
2272 -added flag -skp to put a space between all Perl keywords and following paren.
2273 The default is to only do this for certain keywords.  Suggested by
2274 H.Merijn Brand.
2275
2276 -added flag -sfp to put a space between a function name and following paren.
2277 The default is not to do this.  Suggested by H.Merijn Brand.
2278
2279 -Added patch to avoid breaking GetOpt::Long::Configure set by calling program. 
2280 Thanks to Philippe Bruhat.
2281
2282 -An error was fixed in which certain parameters in a .perltidyrc file given
2283 without the equals sign were not recognized.  That is,
2284 '--brace-tightness 0' gave an error but '--brace-tightness=0' worked
2285 ok.  Thanks to Zac Hansen.
2286
2287 -An error preventing the -nwrs flag from working was corrected. Thanks to
2288  Greg Ferguson.
2289
2290 -Corrected some alignment problems with entab option.
2291
2292 -A bug with the combination of -lp and -extrude was fixed (though this
2293 combination doesn't really make sense).  The bug was that a line with
2294 a single zero would be dropped.  Thanks to Cameron Hayne.
2295
2296 -Updated Windows detection code to avoid an undefined variable.
2297 Thanks to Joe Yates and Russ Jones.
2298
2299 -Improved formatting for short trailing statements following a closing paren.
2300 Thanks to Joe Matarazzo.
2301
2302 -The handling of the -icb (indent closing block braces) flag has been changed
2303 slightly to provide more consistent and predictable formatting of complex
2304 structures.  Instead of giving a closing block brace the indentation of the
2305 previous line, it is now given one extra indentation level.  The two methods
2306 give the same result if the previous line was a complete statement, as in this
2307 example:
2308
2309        if ($task) {
2310            yyy();
2311            }    # -icb
2312        else {
2313            zzz();
2314            }
2315 The change also fixes a problem with empty blocks such as:
2316
2317    OLD, -icb:
2318    elsif ($debug) {
2319    }
2320
2321    NEW, -icb:
2322    elsif ($debug) {
2323        }
2324
2325 -A problem with -icb was fixed in which a closing brace was misplaced when
2326 it followed a quote which spanned multiple lines.
2327
2328 -Some improved breakpoints for -wba='&amp;&amp; || and or'
2329
2330 -Fixed problem with misaligned cuddled else in complex statements
2331 when the -bar flag was also used.  Thanks to Alex and Royce Reese.
2332
2333 -Corrected documentation to show that --outdent-long-comments is the default.
2334 Thanks to Mario Lia.
2335
2336 -New flag -otr (opening-token-right) is similar to -bar (braces-always-right)
2337 but applies to non-structural opening tokens.
2338
2339 -new flags -sot (stack-opening-token), -sct (stack-closing-token).
2340 Suggested by Tony.
2341 </code></pre>
2342
2343 <h2>2003 10 21</h2>
2344
2345 <pre><code>-The default has been changed to not do syntax checking with perl.  
2346   Use -syn if you want it.  Perltidy is very robust now, and the -syn
2347   flag now causes more problems than it's worth because of BEGIN blocks
2348   (which get executed with perl -c).  For example, perltidy will never
2349   return when trying to beautify this code if -syn is used:
2350
2351        BEGIN { 1 while { }; }
2352
2353  Although this is an obvious error, perltidy is often run on untested
2354  code which is more likely to have this sort of problem.  A more subtle
2355  example is:
2356
2357        BEGIN { use FindBin; }
2358
2359  which may hang on some systems using -syn if a shared file system is
2360  unavailable.
2361
2362 -Changed style -gnu to use -cti=1 instead of -cti=2 (see next item).
2363  In most cases it looks better.  To recover the previous format, use
2364  '-gnu -cti=2'
2365
2366 -Added flags -cti=n for finer control of closing token indentation.
2367   -cti = 0 no extra indentation (default; same as -nicp)
2368   -cti = 1 enough indentation so that the closing token
2369        aligns with its opening token.
2370   -cti = 2 one extra indentation level if the line has the form 
2371          );   ];   or   };     (same as -icp).
2372
2373   The new option -cti=1 works well with -lp:
2374
2375   EXAMPLES:
2376
2377    # perltidy -lp -cti=1
2378    @month_of_year = (
2379                       'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
2380                       'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
2381                     );
2382
2383    # perltidy -lp -cti=2
2384    @month_of_year = (
2385                       'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
2386                       'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
2387                       );
2388  This is backwards compatible with -icp. See revised manual for
2389  details.  Suggested by Mike Pennington.
2390
2391 -Added flag '--preserve-line-endings' or '-ple' to cause the output
2392  line ending to be the same as in the input file, for unix, dos, 
2393  or mac line endings.  Only works under unix. Suggested by 
2394  Rainer Hochschild.
2395
2396 -Added flag '--output-line-ending=s' or '-ole=s' where s=dos or win,
2397  unix, or mac.  Only works under unix.
2398
2399 -Files with Mac line endings should now be handled properly under unix
2400  and dos without being passed through a converter.
2401
2402 -You may now include 'and', 'or', and 'xor' in the list following
2403  '--want-break-after' to get line breaks after those keywords rather than
2404  before them.  Suggested by Rainer Hochschild.
2405
2406 -Corrected problem with command line option for -vtc=n and -vt=n. The
2407  equals sign was being eaten up by the Windows shell so perltidy didn't
2408  see it.
2409 </code></pre>
2410
2411 <h2>2003 07 26</h2>
2412
2413 <pre><code>-Corrected cause of warning message with recent versions of Perl:
2414    "Possible precedence problem on bitwise &amp; operator at ..."
2415  Thanks to Jim Files.
2416
2417 -fixed bug with -html with '=for pod2html' sections, in which code/pod
2418 output order was incorrect.  Thanks to Tassilo von Parseval.
2419
2420 -fixed bug when the -html flag is used, in which the following error
2421 message, plus others, appear:
2422     did not see &lt;body&gt; in pod2html output
2423 This was caused by a change in the format of html output by pod2html
2424 VERSION 1.04 (included with perl 5.8).  Thanks to Tassilo von Parseval.
2425
2426 -Fixed bug where an __END__ statement would be mistaken for a label
2427 if it is immediately followed by a line with a leading colon. Thanks
2428 to John Bayes.
2429
2430 -Implemented guessing logic for brace types when it is ambiguous.  This
2431 has been on the TODO list a long time.  Thanks to Boris Zentner for
2432 an example.
2433
2434 -Long options may now be negated either as '--nolong-option' 
2435 or '--no-long-option'.  Thanks to Philip Newton for the suggestion.
2436
2437 -added flag --html-entities or -hent which controls the use of
2438 Html::Entities for html formatting.  Use --nohtml-entities or -nhent to
2439 prevent the use of Html::Entities to encode special symbols.  The
2440 default is -hent.  Html::Entities when formatting perl text to escape
2441 special symbols.  This may or may not be the right thing to do,
2442 depending on browser/language combinations.  Thanks to Burak Gursoy for
2443 this suggestion.
2444
2445 -Bareword strings with leading '-', like, '-foo' now count as 1 token
2446 for horizontal tightness.  This way $a{'-foo'}, $a{foo}, and $a{-foo}
2447 are now all treated similarly.  Thus, by default, OLD: $a{ -foo } will
2448 now be NEW: $a{-foo}.  Suggested by Mark Olesen.
2449
2450 -added 2 new flags to control spaces between keywords and opening parens:
2451   -sak=s  or --space-after-keyword=s,  and
2452   -nsak=s or --nospace-after-keyword=s, where 's' is a list of keywords.
2453
2454 The new default list of keywords which get a space is:
2455
2456   "my local our and or eq ne if else elsif until unless while for foreach
2457     return switch case given when"
2458
2459 Use -sak=s and -nsak=s to add and remove keywords from this list,
2460    respectively.
2461
2462 Explanation: Stephen Hildrey noted that perltidy was being inconsistent
2463 in placing spaces between keywords and opening parens, and sent a patch
2464 to give user control over this.  The above list was selected as being
2465 a reasonable default keyword list.  Previously, perltidy
2466 had a hardwired list which also included these keywords:
2467
2468        push pop shift unshift join split die
2469
2470 but did not have 'our'.  Example: if you prefer to make perltidy behave
2471 exactly as before, you can include the following two lines in your
2472 .perltidyrc file: 
2473
2474   -sak="push pop local shift unshift join split die"
2475   -nsak="our"
2476
2477 -Corrected html error in .toc file when -frm -html is used (extra ");
2478  browsers were tolerant of it.
2479
2480 -Improved alignment of chains of binary and ?/: operators. Example:
2481  OLD:
2482    $leapyear =
2483      $year % 4     ? 0
2484      : $year % 100 ? 1
2485      : $year % 400 ? 0
2486      : 1;
2487  NEW:
2488    $leapyear =
2489        $year % 4   ? 0
2490      : $year % 100 ? 1
2491      : $year % 400 ? 0
2492      : 1;
2493
2494 -improved breakpoint choices involving '-&gt;'
2495
2496 -Corrected tokenization of things like ${#}. For example,
2497  ${#} is valid, but ${# } is a syntax error.
2498
2499 -Corrected minor tokenization errors with indirect object notation.
2500  For example, 'new A::()' works now.
2501
2502 -Minor tokenization improvements; all perl code distributed with perl 5.8 
2503  seems to be parsed correctly except for one instance (lextest.t) 
2504  of the known bug.
2505 </code></pre>
2506
2507 <h2>2002 11 30</h2>
2508
2509 <pre><code>-Implemented scalar attributes.  Thanks to Sean Tobin for noting this.
2510
2511 -Fixed glitch introduced in previous release where -pre option
2512 was not outputting a leading html &lt;pre&gt; tag.
2513
2514 -Numerous minor improvements in vertical alignment, including the following:
2515
2516 -Improved alignment of opening braces in many cases.  Needed for improved
2517 switch/case formatting, and also suggested by Mark Olesen for sort/map/grep
2518 formatting.  For example:
2519
2520  OLD:
2521    @modified =
2522      map { $_-&gt;[0] }
2523      sort { $a-&gt;[1] &lt;=&gt; $b-&gt;[1] }
2524      map { [ $_, -M ] } @filenames;
2525
2526  NEW:
2527    @modified =
2528      map  { $_-&gt;[0] }
2529      sort { $a-&gt;[1] &lt;=&gt; $b-&gt;[1] }
2530      map  { [ $_, -M ] } @filenames;
2531
2532 -Eliminated alignments across unrelated statements. Example:
2533  OLD:
2534    $borrowerinfo-&gt;configure( -state =&gt; 'disabled' );
2535    $borrowerinfo-&gt;grid( -col        =&gt; 1, -row =&gt; 0, -sticky =&gt; 'w' );
2536
2537  NEW:  
2538    $borrowerinfo-&gt;configure( -state =&gt; 'disabled' );
2539    $borrowerinfo-&gt;grid( -col =&gt; 1, -row =&gt; 0, -sticky =&gt; 'w' );
2540
2541  Thanks to Mark Olesen for suggesting this.
2542
2543 -Improved alignement of '='s in certain cases.
2544  Thanks to Norbert Gruener for sending an example.
2545
2546 -Outdent-long-comments (-olc) has been re-instated as a default, since
2547  it works much better now.  Use -nolc if you want to prevent it.
2548
2549 -Added check for 'perltidy file.pl -o file.pl', which causes file.pl
2550 to be lost. (The -b option should be used instead). Thanks to mreister
2551 for reporting this problem.
2552 </code></pre>
2553
2554 <h2>2002 11 06</h2>
2555
2556 <pre><code>-Switch/case or given/when syntax is now recognized.  Its vertical alignment
2557 is not great yet, but it parses ok.  The words 'switch', 'case', 'given',
2558 and 'when' are now treated as keywords.  If this causes trouble with older
2559 code, we could introduce a switch to deactivate it.  Thanks to Stan Brown
2560 and Jochen Schneider for recommending this.
2561
2562 -Corrected error parsing sub attributes with call parameters.
2563 Thanks to Marc Kerr for catching this.
2564
2565 -Sub prototypes no longer need to be on the same line as sub names.  
2566
2567 -a new flag -frm or --frames will cause html output to be in a
2568 frame, with table of contents in the left panel and formatted source
2569 in the right panel.  Try 'perltidy -html -frm somemodule.pm' for example.
2570
2571 -The new default for -html formatting is to pass the pod through Pod::Html.
2572 The result is syntax colored code within your pod documents. This can be
2573 deactivated with -npod.  Thanks to those who have written to discuss this,
2574 particularly Mark Olesen and Hugh Myers.
2575
2576 -the -olc (--outdent-long-comments) option works much better.  It now outdents
2577 groups of consecutive comments together, and by just the amount needed to
2578 avoid having any one line exceeding the maximum line length.
2579
2580 -block comments are now trimmed of trailing whitespace.
2581
2582 -if a directory specified with -opath does not exist, it will be created.
2583
2584 -a table of contents to packages and subs is output when -html is used.
2585 Use -ntoc to prevent this. 
2586
2587 -fixed an unusual bug in which a 'for' statement following a 'format'
2588 statement was not correctly tokenized.  Thanks to Boris Zentner for
2589 catching this.
2590
2591 -Tidy.pm is no longer dependent on modules IO::Scalar and IO::ScalarArray.  
2592 There were some speed issues.  Suggested by Joerg Walter.
2593
2594 -The treatment of quoted wildcards (file globs) is now system-independent. 
2595 For example
2596
2597    perltidy 'b*x.p[lm]'
2598
2599 would match box.pl, box.pm, brinx.pm under any operating system.  Of
2600 course, anything unquoted will be subject to expansion by any shell.
2601
2602 -default color for keywords under -html changed from 
2603 SaddleBrown (#8B4513) to magenta4 (#8B008B).
2604
2605 -fixed an arg parsing glitch in which something like:
2606   perltidy quick-help
2607 would trigger the help message and exit, rather than operate on the
2608 file 'quick-help'.
2609 </code></pre>
2610
2611 <h2>2002 09 22</h2>
2612
2613 <pre><code>-New option '-b' or '--backup-and-modify-in-place' will cause perltidy to
2614 overwrite the original file with the tidied output file.  The original
2615 file will be saved with a '.bak' extension (which can be changed with
2616 -bext=s).  Thanks to Rudi Farkas for the suggestion.
2617
2618 -An index to all subs is included at the top of -html output, unless
2619 only the &lt;pre&gt; section is written.
2620
2621 -Anchor lines of the form &lt;a name="mysub"&gt;&lt;/a&gt; are now inserted at key points
2622 in html output, such as before sub definitions, for the convenience of
2623 postprocessing scripts.  Suggested by Howard Owen.
2624
2625 -The cuddled-else (-ce) flag now also makes cuddled continues, like
2626 this:
2627
2628    while ( ( $pack, $file, $line ) = caller( $i++ ) ) {
2629       # bla bla
2630    } continue {
2631        $prevpack = $pack;
2632    }
2633
2634 Suggested by Simon Perreault.  
2635
2636 -Fixed bug in which an extra blank line was added before an =head or 
2637 similar pod line after an __END__ or __DATA__ line each time 
2638 perltidy was run.  Also, an extra blank was being added after
2639 a terminal =cut.  Thanks to Mike Birdsall for reporting this.
2640 </code></pre>
2641
2642 <h2>2002 08 26</h2>
2643
2644 <pre><code>-Fixed bug in which space was inserted in a hyphenated hash key:
2645    my $val = $myhash{USER-NAME};
2646  was converted to:
2647    my $val = $myhash{USER -NAME}; 
2648  Thanks to an anonymous bug reporter at sourceforge.
2649
2650 -Fixed problem with the '-io' ('--indent-only') where all lines 
2651  were double spaced.  Thanks to Nick Andrew for reporting this bug.
2652
2653 -Fixed tokenization error in which something like '-e1' was 
2654  parsed as a number. 
2655
2656 -Corrected a rare problem involving older perl versions, in which 
2657  a line break before a bareword caused problems with 'use strict'.
2658  Thanks to Wolfgang Weisselberg for noting this.
2659
2660 -More syntax error checking added.
2661
2662 -Outdenting labels (-ola) has been made the default, in order to follow the
2663  perlstyle guidelines better.  It's probably a good idea in general, but
2664  if you do not want this, use -nola in your .perltidyrc file.
2665
2666 -Updated rules for padding logical expressions to include more cases.
2667  Thanks to Wolfgang Weisselberg for helpful discussions.
2668
2669 -Added new flag -osbc (--outdent-static-block-comments) which will
2670  outdent static block comments by 2 spaces (or whatever -ci equals).
2671  Requested by Jon Robison.
2672 </code></pre>
2673
2674 <h2>2002 04 25</h2>
2675
2676 <pre><code>-Corrected a bug, introduced in the previous release, in which some
2677  closing side comments (-csc) could have incorrect text.  This is
2678  annoying but will be correct the next time perltidy is run with -csc.
2679
2680 -Fixed bug where whitespace was being removed between 'Bar' and '()' 
2681  in a use statement like:
2682
2683       use Foo::Bar ();
2684
2685 -Whenever possible, if a logical expression is broken with leading
2686  '&amp;&amp;', '||', 'and', or 'or', then the leading line will be padded
2687  with additional space to produce alignment.  This has been on the
2688  todo list for a long time; thanks to Frank Steinhauer for reminding
2689  me to do it.  Notice the first line after the open parens here:
2690
2691        OLD: perltidy -lp
2692        if (
2693             !param("rules.to.$linecount")
2694             &amp;&amp; !param("rules.from.$linecount")
2695             &amp;&amp; !param("rules.subject.$linecount")
2696             &amp;&amp; !(
2697                   param("rules.fieldname.$linecount")
2698                   &amp;&amp; param("rules.fieldval.$linecount")
2699             )
2700             &amp;&amp; !param("rules.size.$linecount")
2701             &amp;&amp; !param("rules.custom.$linecount")
2702          )
2703
2704        NEW: perltidy -lp
2705        if (
2706                !param("rules.to.$linecount")
2707             &amp;&amp; !param("rules.from.$linecount")
2708             &amp;&amp; !param("rules.subject.$linecount")
2709             &amp;&amp; !(
2710                      param("rules.fieldname.$linecount")
2711                   &amp;&amp; param("rules.fieldval.$linecount")
2712             )
2713             &amp;&amp; !param("rules.size.$linecount")
2714             &amp;&amp; !param("rules.custom.$linecount")
2715          )
2716 </code></pre>
2717
2718 <h2>2002 04 16</h2>
2719
2720 <pre><code>-Corrected a mistokenization of variables for a package with a name
2721  equal to a perl keyword.  For example: 
2722
2723     my::qx();
2724     package my;
2725     sub qx{print "Hello from my::qx\n";}
2726
2727  In this case, the leading 'my' was mistokenized as a keyword, and a
2728  space was being place between 'my' and '::'.  This has been
2729  corrected.  Thanks to Martin Sluka for discovering this. 
2730
2731 -A new flag -bol (--break-at-old-logic-breakpoints)
2732  has been added to control whether containers with logical expressions
2733  should be broken open.  This is the default.
2734
2735 -A new flag -bok (--break-at-old-keyword-breakpoints)
2736  has been added to follow breaks at old keywords which return lists,
2737  such as sort and map.  This is the default.
2738
2739 -A new flag -bot (--break-at-old-trinary-breakpoints) has been added to
2740  follow breaks at trinary (conditional) operators.  This is the default.
2741
2742 -A new flag -cab=n has been added to control breaks at commas after
2743  '=&gt;' tokens.  The default is n=1, meaning break unless this breaks
2744  open an existing on-line container.
2745
2746 -A new flag -boc has been added to allow existing list formatting
2747  to be retained.  (--break-at-old-comma-breakpoints).  See updated manual.
2748
2749 -A new flag -iob (--ignore-old-breakpoints) has been added to
2750  prevent the locations of old breakpoints from influencing the output
2751  format.
2752
2753 -Corrected problem where nested parentheses were not getting full
2754  indentation.  This has been on the todo list for some time; thanks 
2755  to Axel Rose for a snippet demonstrating this issue.
2756
2757            OLD: inner list is not indented
2758            $this-&gt;sendnumeric(
2759                $this-&gt;server,
2760                (
2761                  $ret-&gt;name,        $user-&gt;username, $user-&gt;host,
2762                $user-&gt;server-&gt;name, $user-&gt;nick,     "H"
2763                ),
2764            );
2765
2766            NEW:
2767            $this-&gt;sendnumeric(
2768                $this-&gt;server,
2769                (
2770                    $ret-&gt;name,          $user-&gt;username, $user-&gt;host,
2771                    $user-&gt;server-&gt;name, $user-&gt;nick,     "H"
2772                ),
2773            );
2774
2775 -Code cleaned up by removing the following unused, undocumented flags.
2776  They should not be in any .perltidyrc files because they were just
2777  experimental flags which were never documented.  Most of them placed
2778  artificial limits on spaces, and Wolfgang Weisselberg convinced me that
2779  most of them they do more harm than good by causing unexpected results.
2780
2781  --maximum-continuation-indentation (-mci)
2782  --maximum-whitespace-columns
2783  --maximum-space-to-comment (-xsc)
2784  --big-space-jump (-bsj)
2785
2786 -Pod file 'perltidy.pod' has been appended to the script 'perltidy', and
2787  Tidy.pod has been append to the module 'Tidy.pm'.  Older MakeMaker's
2788  were having trouble.
2789
2790 -A new flag -isbc has been added for more control on comments. This flag
2791  has the effect that if there is no leading space on the line, then the
2792  comment will not be indented, and otherwise it may be.  If both -ibc and
2793  -isbc are set, then -isbc takes priority.  Thanks to Frank Steinhauer
2794  for suggesting this.
2795
2796 -A new document 'stylekey.pod' has been created to quickly guide new users
2797  through the maze of perltidy style parameters.  An html version is 
2798  on the perltidy web page.  Take a look! It should be very helpful.
2799
2800 -Parameters for controlling 'vertical tightness' have been added:
2801  -vt and -vtc are the main controls, but finer control is provided
2802  with -pvt, -pcvt, -bvt, -bcvt, -sbvt, -sbcvt.  Block brace vertical
2803  tightness controls have also been added.
2804  See updated manual and also see 'stylekey.pod'. Simple examples:
2805
2806    # perltidy -lp -vt=1 -vtc=1
2807    @month_of_year = ( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
2808                       'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' );
2809
2810    # perltidy -lp -vt=1 -vtc=0
2811    @month_of_year = ( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
2812                       'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
2813    );
2814
2815 -Lists which do not format well in uniform columns are now better
2816  identified and formated.
2817
2818    OLD:
2819    return $c-&gt;create( 'polygon', $x, $y, $x + $ruler_info{'size'},
2820        $y + $ruler_info{'size'}, $x - $ruler_info{'size'},
2821        $y + $ruler_info{'size'} );
2822
2823    NEW:
2824    return $c-&gt;create(
2825        'polygon', $x, $y,
2826        $x + $ruler_info{'size'},
2827        $y + $ruler_info{'size'},
2828        $x - $ruler_info{'size'},
2829        $y + $ruler_info{'size'}
2830    );
2831
2832    OLD:
2833      radlablist($f1, pad('Initial', $p), $b-&gt;{Init}-&gt;get_panel_ref, 'None ',
2834                 'None', 'Default', 'Default', 'Simple', 'Simple');
2835    NEW:
2836      radlablist($f1,
2837                 pad('Initial', $p),
2838                 $b-&gt;{Init}-&gt;get_panel_ref,
2839                 'None ', 'None', 'Default', 'Default', 'Simple', 'Simple');
2840
2841 -Corrected problem where an incorrect html filename was generated for 
2842  external calls to Tidy.pm module.  Fixed incorrect html title when
2843  Tidy.pm is called with IO::Scalar or IO::Array source.
2844
2845 -Output file permissions are now set as follows.  An output script file
2846  gets the same permission as the input file, except that owner
2847  read/write permission is added (otherwise, perltidy could not be
2848  rerun).  Html output files use system defaults.  Previously chmod 0755
2849  was used in all cases.  Thanks to Mark Olesen for bringing this up.
2850
2851 -Missing semicolons will not be added in multi-line blocks of type
2852  sort, map, or grep.  This brings perltidy into closer agreement
2853  with common practice.  Of course, you can still put semicolons 
2854  there if you like.  Thanks to Simon Perreault for a discussion of this.
2855
2856 -Most instances of extra semicolons are now deleted.  This is
2857  particularly important if the -csc option is used.  Thanks to Wolfgang
2858  Weisselberg for noting this.  For example, the following line
2859  (produced by 'h2xs' :) has an extra semicolon which will now be
2860  removed:
2861
2862     BEGIN { plan tests =&gt; 1 };
2863
2864 -New parameter -csce (--closing-side-comment-else-flag) can be used
2865  to control what text is appended to 'else' and 'elsif' blocks.
2866  Default is to just add leading 'if' text to an 'else'.  See manual.
2867
2868 -The -csc option now labels 'else' blocks with additinal information
2869  from the opening if statement and elsif statements, if space.
2870  Thanks to Wolfgang Weisselberg for suggesting this.
2871
2872 -The -csc option will now remove any old closing side comments
2873  below the line interval threshold. Thanks to Wolfgang Weisselberg for
2874  suggesting this.
2875
2876 -The abbreviation feature, which was broken in the previous version,
2877  is now fixed.  Thanks to Michael Cartmell for noting this.
2878
2879 -Vertical alignment is now done for '||='  .. somehow this was 
2880  overlooked.
2881 </code></pre>
2882
2883 <h2>2002 02 25</h2>
2884
2885 <pre><code>-This version uses modules for the first time, and a standard perl
2886  Makefile.PL has been supplied.  However, perltidy may still be
2887  installed as a single script, without modules.  See INSTALL for
2888  details.
2889
2890 -The man page 'perl2web' has been merged back into the main 'perltidy'
2891  man page to simplify installation.  So you may remove that man page
2892  if you have an older installation.
2893
2894 -Added patch from Axel Rose for MacPerl.  The patch prompts the user
2895  for command line arguments before calling the module 
2896  Perl::Tidy::perltidy.
2897
2898 -Corrected bug with '-bar' which was introduced in the previous
2899  version.  A closing block brace was being indented.  Thanks to
2900  Alexandros M Manoussakis for reporting this.
2901
2902 -New parameter '--entab-leading-whitespace=n', or '-et=n', has been
2903  added for those who prefer tabs.  This behaves different from the
2904  existing '-t' parameter; see updated man page.  Suggested by Mark
2905  Olesen.
2906
2907 -New parameter '--perl-syntax-check-flags=s'  or '-pcsf=s' can be
2908  used to change the flags passed to perltidy in a syntax check.
2909  See updated man page.  Suggested by Mark Olesen. 
2910
2911 -New parameter '--output-path=s'  or '-opath=s' will cause output
2912  files to be placed in directory s.  See updated man page.  Thanks for
2913  Mark Olesen for suggesting this.
2914
2915 -New parameter --dump-profile (or -dpro) will dump to
2916  standard output information about the search for a
2917  configuration file, the name of whatever configuration file
2918  is selected, and its contents.  This should help debugging
2919  config files, especially on different Windows systems.
2920
2921 -The -w parameter now notes possible errors of the form:
2922
2923        $comment = s/^\s*(\S+)\..*/$1/;   # trim whitespace
2924
2925 -Corrections added for a leading ':' and for leaving a leading 'tcsh'
2926  line untouched.  Mark Olesen reported that lines of this form were
2927  accepted by perl but not by perltidy:
2928
2929        : # use -*- perl -*-
2930        eval 'exec perl -wS $0 "$@"'  # shell should exec 'perl'
2931        unless 1;                     # but Perl should skip this one
2932
2933  Perl will silently swallow a leading colon on line 1 of a
2934  script, and now perltidy will do likewise.  For example,
2935  this is a valid script, provided that it is the first line,
2936  but not otherwise:
2937
2938        : print "Hello World\n";
2939
2940  Also, perltidy will now mark a first line with leading ':' followed by
2941  '#' as type SYSTEM (just as a #!  line), not to be formatted.
2942
2943 -List formatting improved for certain lists with special
2944  initial terms, such as occur with 'printf', 'sprintf',
2945  'push', 'pack', 'join', 'chmod'.  The special initial term is
2946  now placed on a line by itself.  For example, perltidy -gnu
2947
2948     OLD:
2949        $Addr = pack(
2950                     "C4",                hex($SourceAddr[0]),
2951                     hex($SourceAddr[1]), hex($SourceAddr[2]),
2952                     hex($SourceAddr[3])
2953                     );
2954
2955     NEW:
2956        $Addr = pack("C4",
2957                     hex($SourceAddr[0]), hex($SourceAddr[1]),
2958                     hex($SourceAddr[2]), hex($SourceAddr[3]));
2959
2960      OLD:
2961            push (
2962                  @{$$self{states}}, '64', '66', '68',
2963                  '70',              '72', '74', '76',
2964                  '78',              '80', '82', '84',
2965                  '86',              '88', '90', '92',
2966                  '94',              '96', '98', '100',
2967                  '102',             '104'
2968                  );
2969
2970      NEW:
2971            push (
2972                  @{$$self{states}},
2973                  '64', '66', '68', '70', '72',  '74',  '76',
2974                  '78', '80', '82', '84', '86',  '88',  '90',
2975                  '92', '94', '96', '98', '100', '102', '104'
2976                  );
2977
2978 -Lists of complex items, such as matricies, are now detected
2979  and displayed with just one item per row:
2980
2981    OLD:
2982    $this-&gt;{'CURRENT'}{'gfx'}{'MatrixSkew'} = Text::PDF::API::Matrix-&gt;new(
2983        [ 1, tan( deg2rad($a) ), 0 ], [ tan( deg2rad($b) ), 1, 0 ],
2984        [ 0, 0, 1 ]
2985    );
2986
2987    NEW:
2988    $this-&gt;{'CURRENT'}{'gfx'}{'MatrixSkew'} = Text::PDF::API::Matrix-&gt;new(
2989        [ 1,                  tan( deg2rad($a) ), 0 ],
2990        [ tan( deg2rad($b) ), 1,                  0 ],
2991        [ 0,                  0,                  1 ]
2992    );
2993
2994 -The perl syntax check will be turned off for now when input is from
2995  standard input or standard output.  The reason is that this requires
2996  temporary files, which has produced far too many problems during
2997  Windows testing.  For example, the POSIX module under Windows XP/2000
2998  creates temporary names in the root directory, to which only the
2999  administrator should have permission to write.
3000
3001 -Merged patch sent by Yves Orton to handle appropriate
3002  configuration file locations for different Windows varieties
3003  (2000, NT, Me, XP, 95, 98).
3004
3005 -Added patch to properly handle a for/foreach loop without
3006  parens around a list represented as a qw.  I didn't know this
3007  was possible until Wolfgang Weisselberg pointed it out:
3008
3009        foreach my $key qw\Uno Due Tres Quadro\ {
3010            print "Set $key\n";
3011        }
3012
3013  But Perl will give a syntax error without the $ variable; ie this will
3014  not work:
3015
3016        foreach qw\Uno Due Tres Quadro\ {
3017            print "Set $_\n";
3018        }
3019
3020 -Merged Windows version detection code sent by Yves Orton.  Perltidy
3021  now automatically turns off syntax checking for Win 9x/ME versions,
3022  and this has solved a lot of robustness problems.  These systems 
3023  cannot reliably handle backtick operators.  See man page for
3024  details.
3025
3026 -Merged VMS filename handling patch sent by Michael Cartmell.  (Invalid
3027  output filenames were being created in some cases). 
3028
3029 -Numerous minor improvements have been made for -lp style indentation.
3030
3031 -Long C-style 'for' expressions will be broken after each ';'.   
3032
3033  'perltidy -gnu' gives:
3034
3035    OLD:
3036    for ($status = $db-&gt;seq($key, $value, R_CURSOR()) ; $status == 0
3037         and $key eq $origkey ; $status = $db-&gt;seq($key, $value, R_NEXT())) 
3038
3039    NEW:
3040    for ($status = $db-&gt;seq($key, $value, R_CURSOR()) ;
3041         $status == 0 and $key eq $origkey ;
3042         $status = $db-&gt;seq($key, $value, R_NEXT()))
3043
3044 -For the -lp option, a single long term within parens
3045  (without commas) now has better alignment.  For example,
3046  perltidy -gnu
3047
3048            OLD:
3049            $self-&gt;throw("Must specify a known host, not $location,"
3050                  . " possible values ("
3051                  . join (",", sort keys %hosts) . ")");
3052
3053            NEW:
3054            $self-&gt;throw("Must specify a known host, not $location,"
3055                         . " possible values ("
3056                         . join (",", sort keys %hosts) . ")");
3057 </code></pre>
3058
3059 <h2>2001 12 31</h2>
3060
3061 <pre><code>-This version is about 20 percent faster than the previous
3062  version as a result of optimization work.  The largest gain
3063  came from switching to a dispatch hash table in the
3064  tokenizer.
3065
3066 -perltidy -html will check to see if HTML::Entities is
3067  installed, and if so, it will use it to encode unsafe
3068  characters.
3069
3070 -Added flag -oext=ext to change the output file extension to
3071  be different from the default ('tdy' or 'html').  For
3072  example:
3073
3074    perltidy -html -oext=htm filename
3075
3076 will produce filename.htm
3077
3078 -Added flag -cscw to issue warnings if a closing side comment would replace
3079 an existing, different side comments.  See the man page for details.
3080 Thanks to Peter Masiar for helpful discussions.
3081
3082 -Corrected tokenization error of signed hex/octal/binary numbers. For
3083 example, the first hex number below would have been parsed correctly
3084 but the second one was not:
3085    if ( ( $tmp &gt;= 0x80_00_00 ) || ( $tmp &lt; -0x80_00_00 ) ) { }
3086
3087 -'**=' was incorrectly tokenized as '**' and '='.  This only
3088     caused a problem with the -extrude opton.
3089
3090 -Corrected a divide by zero when -extrude option is used
3091
3092 -The flag -w will now contain all errors reported by 'perl -c' on the
3093 input file, but otherwise they are not reported.  The reason is that
3094 perl will report lots of problems and syntax errors which are not of
3095 interest when only a small snippet is being formatted (such as missing
3096 modules and unknown bare words).  Perltidy will always report all
3097 significant syntax errors that it finds, such as unbalanced braces,
3098 unless the -q (quiet) flag is set.
3099
3100 -Merged modifications created by Hugh Myers into perltidy.
3101  These include a 'streamhandle' routine which allows perltidy
3102  as a module to operate on input and output arrays and strings
3103  in addition to files.  Documentation and new packaging as a
3104  module should be ready early next year; This is an elegant,
3105  powerful update; many thanks to Hugh for contributing it.
3106 </code></pre>
3107
3108 <h2>2001 11 28</h2>
3109
3110 <pre><code>-added a tentative patch which tries to keep any existing breakpoints
3111 at lines with leading keywords map,sort,eval,grep. The idea is to
3112 improve formatting of sequences of list operations, as in a schwartzian
3113 transform.  Example:
3114
3115    INPUT:
3116    my @sorted = map { $_-&gt;[0] }
3117                 sort { $a-&gt;[1] &lt;=&gt; $b-&gt;[1] }
3118                 map { [ $_, rand ] } @list;
3119
3120    OLD:
3121    my @sorted =
3122      map { $_-&gt;[0] } sort { $a-&gt;[1] &lt;=&gt; $b-&gt;[1] } map { [ $_, rand ] } @list;
3123
3124    NEW:
3125    my @sorted = map { $_-&gt;[0] }
3126      sort { $a-&gt;[1] &lt;=&gt; $b-&gt;[1] }
3127      map { [ $_, rand ] } @list;
3128
3129  The new alignment is not as nice as the input, but this is an improvement.
3130  Thanks to Yves Orton for this suggestion.
3131
3132 -modified indentation logic so that a line with leading opening paren,
3133 brace, or square bracket will never have less indentation than the
3134 line with the corresponding opening token.  Here's a simple example:
3135
3136    OLD:
3137        $mw-&gt;Button(
3138            -text    =&gt; "New Document",
3139            -command =&gt; \&amp;new_document
3140          )-&gt;pack(
3141            -side   =&gt; 'bottom',
3142            -anchor =&gt; 'e'
3143        );
3144
3145    Note how the closing ');' is lined up with the first line, even
3146    though it closes a paren in the 'pack' line.  That seems wrong.
3147
3148    NEW:
3149        $mw-&gt;Button(
3150            -text    =&gt; "New Document",
3151            -command =&gt; \&amp;new_document
3152          )-&gt;pack(
3153            -side   =&gt; 'bottom',
3154            -anchor =&gt; 'e'
3155          );
3156
3157   This seems nicer: you can up-arrow with an editor and arrive at the
3158   opening 'pack' line.
3159
3160 -corrected minor glitch in which cuddled else (-ce) did not get applied
3161 to an 'unless' block, which should look like this:
3162
3163        unless ($test) {
3164
3165        } else {
3166
3167        }
3168
3169  Thanks to Jeremy Mates for reporting this.
3170
3171 -The man page has been reorganized to parameters easier to find.
3172
3173 -Added check for multiple definitions of same subroutine.  It is easy
3174  to introduce this problem when cutting and pasting. Perl does not
3175  complain about it, but it can lead to disaster.
3176
3177 -The command -pro=filename  or -profile=filename may be used to specify a
3178  configuration file which will override the default name of .perltidyrc.
3179  There must not be a space on either side of the '=' sign.  I needed
3180  this to be able to easily test perltidy with a variety of different
3181  configuration files.
3182
3183 -Side comment alignment has been improved somewhat across frequent level
3184  changes, as in short if/else blocks.  Thanks to Wolfgang Weisselberg 
3185  for pointing out this problem.  For example:
3186
3187    OLD:
3188    if ( ref $self ) {    # Called as a method
3189        $format = shift;
3190    }
3191    else {    # Regular procedure call
3192        $format = $self;
3193        undef $self;
3194    }
3195
3196    NEW:
3197    if ( ref $self ) {    # Called as a method
3198        $format = shift;
3199    }
3200    else {                # Regular procedure call
3201        $format = $self;
3202        undef $self;
3203    }
3204
3205 -New command -ssc (--static-side-comment) and related command allows
3206  side comments to be spaced close to preceding character.  This is
3207  useful for displaying commented code as side comments.
3208
3209 -New command -csc (--closing-side-comment) and several related
3210  commands allow comments to be added to (and deleted from) any or all
3211  closing block braces.  This can be useful if you have to maintain large
3212  programs, especially those that you didn't write.  See updated man page.
3213  Thanks to Peter Masiar for this suggestion.  For a simple example:
3214
3215        perltidy -csc
3216
3217        sub foo {
3218            if ( !defined( $_[0] ) ) {
3219                print("Hello, World\n");
3220            }
3221            else {
3222                print( $_[0], "\n" );
3223            }
3224        } ## end sub foo
3225
3226  This added '## end sub foo' to the closing brace.  
3227  To remove it, perltidy -ncsc.
3228
3229 -New commands -ola, for outdenting labels, and -okw, for outdenting
3230  selected control keywords, were implemented.  See the perltidy man
3231  page for details.  Thanks to Peter Masiar for this suggestion.
3232
3233 -Hanging side comment change: a comment will not be considered to be a
3234  hanging side comment if there is no leading whitespace on the line.
3235  This should improve the reliability of identifying hanging side comments.
3236  Thanks to Peter Masiar for this suggestion.
3237
3238 -Two new commands for outdenting, -olq (outdent-long-quotes) and -olc
3239  (outdent-long-comments), have been added.  The original -oll
3240  (outdent-long-lines) remains, and now is an abbreviation for -olq and -olc.
3241  The new default is just -olq.  This was necessary to avoid inconsistency with
3242  the new static block comment option.
3243
3244 -Static block comments:  to provide a way to display commented code
3245  better, the convention is used that comments with a leading '##' should
3246  not be formatted as usual.  Please see '-sbc' (or '--static-block-comment')
3247  for documentation.  It can be deactivated with with -nsbc, but
3248  should not normally be necessary. Thanks to Peter Masiar for this 
3249  suggestion.
3250
3251 -Two changes were made to help show structure of complex lists:
3252  (1) breakpoints are forced after every ',' in a list where any of
3253  the list items spans multiple lines, and
3254  (2) List items which span multiple lines now get continuation indentation.
3255
3256  The following example illustrates both of these points.  Many thanks to
3257  Wolfgang Weisselberg for this snippet and a discussion of it; this is a
3258  significant formatting improvement. Note how it is easier to see the call
3259  parameters in the NEW version:
3260
3261    OLD:
3262    assert( __LINE__, ( not defined $check )
3263        or ref $check
3264        or $check eq "new"
3265        or $check eq "old", "Error in parameters",
3266        defined $old_new ? ( ref $old_new ? ref $old_new : $old_new ) : "undef",
3267        defined $db_new  ? ( ref $db_new  ? ref $db_new  : $db_new )  : "undef",
3268        defined $old_db ? ( ref $old_db ? ref $old_db : $old_db ) : "undef" );
3269
3270    NEW: 
3271    assert(
3272        __LINE__,
3273        ( not defined $check )
3274          or ref $check
3275          or $check eq "new"
3276          or $check eq "old",
3277        "Error in parameters",
3278        defined $old_new ? ( ref $old_new ? ref $old_new : $old_new ) : "undef",
3279        defined $db_new  ? ( ref $db_new  ? ref $db_new  : $db_new )  : "undef",
3280        defined $old_db  ? ( ref $old_db  ? ref $old_db  : $old_db )  : "undef"
3281    );
3282
3283    Another example shows how this helps displaying lists:
3284
3285    OLD:
3286    %{ $self-&gt;{COMPONENTS} } = (
3287        fname =&gt;
3288        { type =&gt; 'name', adj =&gt; 'yes', font =&gt; 'Helvetica', 'index' =&gt; 0 },
3289        street =&gt;
3290        { type =&gt; 'road', adj =&gt; 'yes', font =&gt; 'Helvetica', 'index' =&gt; 2 },
3291    );
3292
3293    The structure is clearer with the added indentation:
3294
3295    NEW:
3296    %{ $self-&gt;{COMPONENTS} } = (
3297        fname =&gt;
3298          { type =&gt; 'name', adj =&gt; 'yes', font =&gt; 'Helvetica', 'index' =&gt; 0 },
3299        street =&gt;
3300          { type =&gt; 'road', adj =&gt; 'yes', font =&gt; 'Helvetica', 'index' =&gt; 2 },
3301    );
3302
3303    -The structure of nested logical expressions is now displayed better.
3304    Thanks to Wolfgang Weisselberg for helpful discussions.  For example,
3305    note how the status of the final 'or' is displayed in the following:
3306
3307    OLD:
3308    return ( !null($op)
3309          and null( $op-&gt;sibling )
3310          and $op-&gt;ppaddr eq "pp_null"
3311          and class($op) eq "UNOP"
3312          and ( ( $op-&gt;first-&gt;ppaddr =~ /^pp_(and|or)$/
3313            and $op-&gt;first-&gt;first-&gt;sibling-&gt;ppaddr eq "pp_lineseq" )
3314            or ( $op-&gt;first-&gt;ppaddr eq "pp_lineseq"
3315                and not null $op-&gt;first-&gt;first-&gt;sibling
3316                and $op-&gt;first-&gt;first-&gt;sibling-&gt;ppaddr eq "pp_unstack" ) ) );
3317
3318    NEW:
3319    return (
3320        !null($op)
3321          and null( $op-&gt;sibling )
3322          and $op-&gt;ppaddr eq "pp_null"
3323          and class($op) eq "UNOP"
3324          and (
3325            (
3326                $op-&gt;first-&gt;ppaddr =~ /^pp_(and|or)$/
3327                and $op-&gt;first-&gt;first-&gt;sibling-&gt;ppaddr eq "pp_lineseq"
3328            )
3329            or ( $op-&gt;first-&gt;ppaddr eq "pp_lineseq"
3330                and not null $op-&gt;first-&gt;first-&gt;sibling
3331                and $op-&gt;first-&gt;first-&gt;sibling-&gt;ppaddr eq "pp_unstack" )
3332          )
3333    );
3334
3335   -A break will always be put before a list item containing a comma-arrow.
3336   This will improve formatting of mixed lists of this form:
3337
3338        OLD:
3339        $c-&gt;create(
3340            'text', 225, 20, -text =&gt; 'A Simple Plot',
3341            -font =&gt; $font,
3342            -fill =&gt; 'brown'
3343        );
3344
3345        NEW:
3346        $c-&gt;create(
3347            'text', 225, 20,
3348            -text =&gt; 'A Simple Plot',
3349            -font =&gt; $font,
3350            -fill =&gt; 'brown'
3351        );
3352
3353  -For convenience, the command -dac (--delete-all-comments) now also
3354  deletes pod.  Likewise, -tac (--tee-all-comments) now also sends pod
3355  to a '.TEE' file.  Complete control over the treatment of pod and
3356  comments is still possible, as described in the updated help message 
3357  and man page.
3358
3359  -The logic which breaks open 'containers' has been rewritten to be completely
3360  symmetric in the following sense: if a line break is placed after an opening
3361  {, [, or (, then a break will be placed before the corresponding closing
3362  token.  Thus, a container either remains closed or is completely cracked
3363  open.
3364
3365  -Improved indentation of parenthesized lists.  For example, 
3366
3367            OLD:
3368            $GPSCompCourse =
3369              int(
3370              atan2( $GPSTempCompLong - $GPSLongitude,
3371              $GPSLatitude - $GPSTempCompLat ) * 180 / 3.14159265 );
3372
3373            NEW:
3374            $GPSCompCourse = int(
3375                atan2(
3376                    $GPSTempCompLong - $GPSLongitude,
3377                    $GPSLatitude - $GPSTempCompLat
3378                  ) * 180 / 3.14159265
3379            );
3380
3381   Further improvements will be made in future releases.
3382
3383  -Some improvements were made in formatting small lists.
3384
3385  -Correspondence between Input and Output line numbers reported in a 
3386   .LOG file should now be exact.  They were sometimes off due to the size
3387   of intermediate buffers.
3388
3389  -Corrected minor tokenization error in which a ';' in a foreach loop
3390   control was tokenized as a statement termination, which forced a 
3391   line break:
3392
3393        OLD:
3394        foreach ( $i = 0;
3395            $i &lt;= 10;
3396            $i += 2
3397          )
3398        {
3399            print "$i ";
3400        }
3401
3402        NEW:
3403        foreach ( $i = 0 ; $i &lt;= 10 ; $i += 2 ) {
3404            print "$i ";
3405        }
3406
3407  -Corrected a problem with reading config files, in which quote marks were not
3408   stripped.  As a result, something like -wba="&amp;&amp; . || " would have the leading
3409   quote attached to the &amp;&amp; and not work correctly.  A workaround for older
3410   versions is to place a space around all tokens within the quotes, like this:
3411   -wba=" &amp;&amp; . || "
3412
3413  -Removed any existing space between a label and its ':'
3414    OLD    : { }
3415    NEW: { }
3416   This was necessary because the label and its colon are a single token.
3417
3418  -Corrected tokenization error for the following (highly non-recommended) 
3419   construct:
3420    $user = @vars[1] / 100;
3421
3422  -Resolved cause of a difference between perltidy under perl v5.6.1 and
3423  5.005_03; the problem was different behavior of \G regex position
3424  marker(!)
3425 </code></pre>
3426
3427 <h2>2001 10 20</h2>
3428
3429 <pre><code>-Corrected a bug in which a break was not being made after a full-line
3430 comment within a short eval/sort/map/grep block.  A flag was not being
3431 zeroed.  The syntax error check catches this.  Here is a snippet which
3432 illustrates the bug:
3433
3434        eval {
3435            #open Socket to Dispatcher
3436            $sock = &amp;OpenSocket;
3437        };
3438
3439 The formatter mistakenly thought that it had found the following 
3440 one-line block:
3441
3442        eval {#open Socket to Dispatcher$sock = &amp;OpenSocket; };
3443
3444 The patch fixes this. Many thanks to Henry Story for reporting this bug.
3445
3446 -Changes were made to help diagnose and resolve problems in a
3447 .perltidyrc file: 
3448   (1) processing of command parameters has been into two separate
3449   batches so that any errors in a .perltidyrc file can be localized.  
3450   (2) commands --help, --version, and as many of the --dump-xxx
3451   commands are handled immediately, without any command line processing
3452   at all.  
3453   (3) Perltidy will ignore any commands in the .perltidyrc file which
3454   cause immediate exit.  These are:  -h -v -ddf -dln -dop -dsn -dtt
3455   -dwls -dwrs -ss.  Thanks to Wolfgang Weisselberg for helpful
3456   suggestions regarding these updates.
3457
3458 -Syntax check has been reinstated as default for MSWin32 systems.  This
3459 way Windows 2000 users will get syntax check by default, which seems
3460 like a better idea, since the number of Win 95/98 systems will be
3461 decreasing over time.  Documentation revised to warn Windows 95/98
3462 users about the problem with empty '&amp;1'.  Too bad these systems
3463 all report themselves as MSWin32.
3464 </code></pre>
3465
3466 <h2>2001 10 16</h2>
3467
3468 <pre><code>-Fixed tokenization error in which a method call of the form
3469
3470    Module::-&gt;new();
3471
3472  got a space before the '::' like this:
3473
3474    Module ::-&gt;new();
3475
3476  Thanks to David Holden for reporting this.
3477
3478 -Added -html control over pod text, using a new abbreviation 'pd'.  See
3479 updated perl2web man page. The default is to use the color of a comment,
3480 but italicized.  Old .css style sheets will need a new line for
3481 .pd to use this.  The old color was the color of a string, and there
3482 was no control.  
3483
3484 -.css lines are now printed in sorted order.
3485
3486 -Fixed interpolation problem where html files had '$input_file' as title
3487 instead of actual input file name.  Thanks to Simon Perreault for finding
3488 this and sending a patch, and also to Tobias Weber.
3489
3490 -Breaks will now have the ':' placed at the start of a line, 
3491 one per line by default because this shows logical structure
3492 more clearly. This coding has been completely redone. Some 
3493 examples of new ?/: formatting:
3494
3495       OLD:
3496            wantarray ? map( $dir::cwd-&gt;lookup($_)-&gt;path, @_ ) :
3497              $dir::cwd-&gt;lookup( $_[0] )-&gt;path;
3498
3499       NEW:
3500            wantarray 
3501              ? map( $dir::cwd-&gt;lookup($_)-&gt;path, @_ )
3502              : $dir::cwd-&gt;lookup( $_[0] )-&gt;path;
3503
3504       OLD:
3505                $a = ( $b &gt; 0 ) ? {
3506                    a =&gt; 1,
3507                    b =&gt; 2
3508                } : { a =&gt; 6, b =&gt; 8 };
3509
3510       NEW:
3511                $a = ( $b &gt; 0 )
3512                  ? {
3513                    a =&gt; 1,
3514                    b =&gt; 2
3515                  }
3516                  : { a =&gt; 6, b =&gt; 8 };
3517
3518    OLD: (-gnu):
3519    $self-&gt;note($self-&gt;{skip} ? "Hunk #$self-&gt;{hunk} ignored at 1.\n" :
3520                "Hunk #$self-&gt;{hunk} failed--$@");
3521
3522    NEW: (-gnu):
3523    $self-&gt;note($self-&gt;{skip} 
3524                ? "Hunk #$self-&gt;{hunk} ignored at 1.\n"
3525                : "Hunk #$self-&gt;{hunk} failed--$@");
3526
3527    OLD:
3528        $which_search =
3529          $opts{"t"} ? 'title'   :
3530          $opts{"s"} ? 'subject' : $opts{"a"} ? 'author' : 'title';
3531
3532    NEW:
3533        $which_search =
3534          $opts{"t"} ? 'title'
3535          : $opts{"s"} ? 'subject'
3536          : $opts{"a"} ? 'author'
3537          : 'title';
3538
3539 You can use -wba=':' to recover the previous default which placed ':'
3540 at the end of a line.  Thanks to Michael Cartmell for helpful
3541 discussions and examples.  
3542
3543 -Tokenizer updated to do syntax checking for matched ?/: pairs.  Also,
3544 the tokenizer now outputs a unique serial number for every balanced
3545 pair of brace types and ?/: pairs.  This greatly simplifies the
3546 formatter.
3547
3548 -Long lines with repeated 'and', 'or', '&amp;&amp;', '||'  will now have
3549 one such item per line.  For example:
3550
3551    OLD:
3552        if ( $opt_d || $opt_m || $opt_p || $opt_t || $opt_x
3553            || ( -e $archive &amp;&amp; $opt_r ) )
3554        {
3555            ( $pAr, $pNames ) = readAr($archive);
3556        }
3557
3558    NEW:
3559        if ( $opt_d
3560            || $opt_m
3561            || $opt_p
3562            || $opt_t
3563            || $opt_x
3564            || ( -e $archive &amp;&amp; $opt_r ) )
3565        {
3566            ( $pAr, $pNames ) = readAr($archive);
3567        }
3568
3569   OLD:
3570        if ( $vp-&gt;{X0} + 4 &lt;= $x &amp;&amp; $vp-&gt;{X0} + $vp-&gt;{W} - 4 &gt;= $x
3571            &amp;&amp; $vp-&gt;{Y0} + 4 &lt;= $y &amp;&amp; $vp-&gt;{Y0} + $vp-&gt;{H} - 4 &gt;= $y ) 
3572
3573   NEW:
3574        if ( $vp-&gt;{X0} + 4 &lt;= $x
3575            &amp;&amp; $vp-&gt;{X0} + $vp-&gt;{W} - 4 &gt;= $x
3576            &amp;&amp; $vp-&gt;{Y0} + 4 &lt;= $y
3577            &amp;&amp; $vp-&gt;{Y0} + $vp-&gt;{H} - 4 &gt;= $y )
3578
3579 -Long lines with multiple concatenated tokens will have concatenated
3580 terms (see below) placed one per line, except for short items.  For
3581 example:
3582
3583   OLD:
3584        $report .=
3585          "Device type:" . $ib-&gt;family . "  ID:" . $ib-&gt;serial . "  CRC:"
3586          . $ib-&gt;crc . ": " . $ib-&gt;model() . "\n";
3587
3588   NEW:
3589        $report .= "Device type:"
3590          . $ib-&gt;family . "  ID:"
3591          . $ib-&gt;serial . "  CRC:"
3592          . $ib-&gt;model()
3593          . $ib-&gt;crc . ": " . "\n";
3594
3595 NOTE: at present 'short' means 8 characters or less.  There is a
3596 tentative flag to change this (-scl), but it is undocumented and
3597 is likely to be changed or removed later, so only use it for testing.  
3598 In the above example, the tokens "  ID:", "  CRC:", and "\n" are below
3599 this limit.  
3600
3601 -If a line which is short enough to fit on a single line was
3602 nevertheless broken in the input file at a 'good' location (see below), 
3603 perltidy will try to retain a break.  For example, the following line
3604 will be formatted as:
3605
3606    open SUM, "&lt;$file"
3607      or die "Cannot open $file ($!)";
3608
3609 if it was broken in the input file, and like this if not:
3610
3611    open SUM, "&lt;$file" or die "Cannot open $file ($!)";
3612
3613 GOOD: 'good' location means before 'and','or','if','unless','&amp;&amp;','||'
3614
3615 The reason perltidy does not just always break at these points is that if
3616 there are multiple, similar statements, this would preclude alignment.  So
3617 rather than check for this, perltidy just tries to follow the input style,
3618 in the hopes that the author made a good choice. Here is an example where 
3619 we might not want to break before each 'if':
3620
3621    ($Locale, @Locale) = ($English, @English) if (@English &gt; @Locale);
3622    ($Locale, @Locale) = ($German,  @German)  if (@German &gt; @Locale);
3623    ($Locale, @Locale) = ($French,  @French)  if (@French &gt; @Locale);
3624    ($Locale, @Locale) = ($Spanish, @Spanish) if (@Spanish &gt; @Locale);
3625
3626 -Added wildcard file expansion for systems with shells which lack this.
3627 Now 'perltidy *.pl' should work under MSDOS/Windows.  Thanks to Hugh Myers 
3628 for suggesting this.  This uses builtin glob() for now; I may change that.
3629
3630 -Added new flag -sbl which, if specified, overrides the value of -bl
3631 for opening sub braces.  This allows formatting of this type:
3632
3633 perltidy -sbl 
3634
3635 sub foo
3636 {
3637    if (!defined($_[0])) {
3638        print("Hello, World\n");
3639    }
3640    else {
3641        print($_[0], "\n");
3642    }
3643 }
3644 Requested by Don Alexander.
3645
3646 -Fixed minor parsing error which prevented a space after a $$ variable
3647 (pid) in some cases.  Thanks to Michael Cartmell for noting this.
3648 For example, 
3649   old: $$&lt; 700 
3650   new: $$ &lt; 700
3651
3652 -Improved line break choices 'and' and 'or' to display logic better.
3653 For example:
3654
3655    OLD:
3656        exists $self-&gt;{'build_dir'} and push @e,
3657          "Unwrapped into directory $self-&gt;{'build_dir'}";
3658
3659    NEW:
3660        exists $self-&gt;{'build_dir'}
3661          and push @e, "Unwrapped into directory $self-&gt;{'build_dir'}";
3662
3663 -Fixed error of multiple use of abbreviatioin '-dsc'.  -dsc remains 
3664 abbreviation for delete-side-comments; -dsm is new abbreviation for 
3665 delete-semicolons.
3666
3667 -Corrected and updated 'usage' help routine.  Thanks to Slaven Rezic for 
3668 noting an error.
3669
3670 -The default for Windows is, for now, not to do a 'perl -c' syntax
3671 check (but -syn will activate it).  This is because of problems with
3672 command.com.  James Freeman sent me a patch which tries to get around
3673 the problems, and it works in many cases, but testing revealed several
3674 issues that still need to be resolved.  So for now, the default is no
3675 syntax check for Windows.
3676
3677 -I added a -T flag when doing perl -c syntax check.
3678 This is because I test it on a large number of scripts from sources
3679 unknown, and who knows what might be hidden in initialization blocks?
3680 Also, deactivated the syntax check if perltidy is run as root.  As a
3681 benign example, running the previous version of perltidy on the
3682 following file would cause it to disappear:
3683
3684        BEGIN{
3685                print "Bye, bye baby!\n";
3686                unlink $0;
3687        }
3688
3689 The new version will not let that happen.
3690
3691 -I am contemplating (but have not yet implemented) making '-lp' the
3692 default indentation, because it is stable now and may be closer to how
3693 perl is commonly formatted.  This could be in the next release.  The
3694 reason that '-lp' was not the original default is that the coding for
3695 it was complex and not ready for the initial release of perltidy.  If
3696 anyone has any strong feelings about this, I'd like to hear.  The
3697 current default could always be recovered with the '-nlp' flag.
3698 </code></pre>
3699
3700 <h2>2001 09 03</h2>
3701
3702 <pre><code>-html updates:
3703     - sub definition names are now specially colored, red by default.  
3704       The letter 'm' is used to identify them.
3705     - keyword 'sub' now has color of other keywords.
3706     - restored html keyword color to __END__ and __DATA__, which was 
3707       accidentally removed in the previous version.
3708
3709 -A new -se (--standard-error-output) flag has been implemented and
3710 documented which causes all errors to be written to standard output
3711 instead of a .ERR file.
3712
3713 -A new -w (--warning-output) flag has been implemented and documented
3714  which causes perltidy to output certain non-critical messages to the
3715  error output file, .ERR.  These include complaints about pod usage,
3716  for example.  The default is to not include these.
3717
3718  NOTE: This replaces an undocumented -w=0 or --warning-level flag
3719  which was tentatively introduced in the previous version to avoid some
3720  unwanted messages.  The new default is the same as the old -w=0, so
3721  that is no longer needed. 
3722
3723  -Improved syntax checking and corrected tokenization of functions such
3724  as rand, srand, sqrt, ...  These can accept either an operator or a term
3725  to their right.  This has been corrected.
3726
3727 -Corrected tokenization of semicolon: testing of the previous update showed 
3728 that the semicolon in the following statement was being mis-tokenized.  That
3729 did no harm, other than adding an extra blank space, but has been corrected.
3730
3731          for (sort {strcoll($a,$b);} keys %investments) {
3732             ...
3733          }
3734
3735 -New syntax check: after wasting 5 minutes trying to resolve a syntax
3736  error in which I had an extra terminal ';' in a complex for (;;) statement, 
3737  I spent a few more minutes adding a check for this in perltidy so it won't
3738  happen again.
3739
3740 -The behavior of --break-before-subs (-bbs) and --break-before-blocks
3741 (-bbb) has been modified.  Also, a new control parameter,
3742 --long-block-line-count=n (-lbl=n) has been introduced to give more
3743 control on -bbb.  This was previously a hardwired value.  The reason
3744 for the change is to reduce the number of unwanted blank lines that
3745 perltidy introduces, and make it less erratic.  It's annoying to remove
3746 an unwanted blank line and have perltidy put it back.  The goal is to
3747 be able to sprinkle a few blank lines in that dense script you
3748 inherited from Bubba.  I did a lot of experimenting with different
3749 schemes for introducing blank lines before and after code blocks, and
3750 decided that there is no really good way to do it.  But I think the new
3751 scheme is an improvement.  You can always deactivate this with -nbbb.
3752 I've been meaning to work on this; thanks to Erik Thaysen for bringing
3753 it to my attention.
3754
3755 -The .LOG file is seldom needed, and I get tired of deleting them, so
3756  they will now only be automatically saved if perltidy thinks that it
3757  made an error, which is almost never.  You can still force the logfile
3758  to be saved with -log or -g.
3759
3760 -Improved method for computing number of columns in a table.  The old
3761 method always tried for an even number.  The new method allows odd
3762 numbers when it is obvious that a list is not a hash initialization
3763 list.
3764
3765   old: my (
3766             $name,       $xsargs, $parobjs, $optypes,
3767             $hasp2child, $pmcode, $hdrcode, $inplacecode,
3768             $globalnew,  $callcopy
3769          )
3770          = @_;
3771
3772   new: my (
3773             $name,   $xsargs,  $parobjs,     $optypes,   $hasp2child,
3774             $pmcode, $hdrcode, $inplacecode, $globalnew, $callcopy
3775          )
3776          = @_;
3777
3778 -I fiddled with the list threshold adjustment, and some small lists
3779 look better now.  Here is the change for one of the lists in test file
3780 'sparse.t':
3781 old:
3782   %units =
3783     ("in", "in", "pt", "pt", "pc", "pi", "mm", "mm", "cm", "cm", "\\hsize", "%",
3784       "\\vsize", "%", "\\textwidth", "%", "\\textheight", "%");
3785
3786 new:
3787   %units = (
3788              "in",      "in", "pt",          "pt", "pc",           "pi",
3789              "mm",      "mm", "cm",          "cm", "\\hsize",      "%",
3790              "\\vsize", "%",  "\\textwidth", "%",  "\\textheight", "%"
3791              );
3792
3793 -Improved -lp formatting at '=' sign.  A break was always being added after
3794 the '=' sign in a statement such as this, (to be sure there was enough room
3795 for the parameters):
3796
3797 old: my $fee =
3798        CalcReserveFee(
3799                        $env,          $borrnum,
3800                        $biblionumber, $constraint,
3801                        $bibitems
3802                        );
3803
3804 The updated version doesn't do this unless the space is really needed:
3805
3806 new: my $fee = CalcReserveFee(
3807                               $env,          $borrnum,
3808                               $biblionumber, $constraint,
3809                               $bibitems
3810                               );
3811
3812 -I updated the tokenizer to allow $#+ and $#-, which seem to be new to
3813 Perl 5.6.  Some experimenting with a recent version of Perl indicated
3814 that it allows these non-alphanumeric '$#' array maximum index
3815 variables: $#: $#- $#+ so I updated the parser accordingly.  Only $#:
3816 seems to be valid in older versions of Perl.
3817
3818 -Fixed a rare formatting problem with -lp (and -gnu) which caused
3819 excessive indentation.
3820
3821 -Many additional syntax checks have been added.
3822
3823 -Revised method for testing here-doc target strings; the following
3824 was causing trouble with a regex test because of the '*' characters:
3825  print &lt;&lt;"*EOF*";
3826  bla bla
3827  *EOF*
3828 Perl seems to allow almost anything to be a here doc target, so an
3829 exact string comparison is now used.
3830
3831 -Made update to allow underscores in binary numbers, like '0b1100_0000'.
3832
3833 -Corrected problem with scanning certain module names; a blank space was 
3834 being inserted after 'warnings' in the following:
3835    use warnings::register;
3836 The problem was that warnings (and a couple of other key modules) were 
3837 being tokenized as keywords.  They should have just been identifiers.
3838
3839 -Corrected tokenization of indirect objects after sort, system, and exec,
3840 after testing produced an incorrect error message for the following
3841 line of code:
3842    print sort $sortsubref @list;
3843
3844 -Corrected minor problem where a line after a format had unwanted
3845 extra continuation indentation.  
3846
3847 -Delete-block-comments (and -dac) now retain any leading hash-bang line
3848
3849 -Update for -lp (and -gnu) to not align the leading '=' of a list
3850 with a previous '=', since this interferes with alignment of parameters.
3851
3852  old:  my $hireDay = new Date;
3853        my $self    = {
3854                     firstName =&gt; undef,
3855                     lastName  =&gt; undef,
3856                     hireDay   =&gt; $hireDay
3857                     };
3858
3859  new:  my $hireDay = new Date;
3860        my $self = {
3861                     firstName =&gt; undef,
3862                     lastName  =&gt; undef,
3863                     hireDay   =&gt; $hireDay
3864                     };
3865
3866 -Modifications made to display tables more compactly when possible,
3867  without adding lines. For example,
3868  old:
3869                '1', "I", '2', "II", '3', "III", '4', "IV",
3870                '5', "V", '6', "VI", '7', "VII", '8', "VIII",
3871                '9', "IX"
3872  new:
3873                '1', "I",   '2', "II",   '3', "III",
3874                '4', "IV",  '5', "V",    '6', "VI",
3875                '7', "VII", '8', "VIII", '9', "IX"
3876
3877 -Corrected minor bug in which -pt=2 did not keep the right paren tight
3878 around a '++' or '--' token, like this:
3879
3880            for ($i = 0 ; $i &lt; length $key ; $i++ )
3881
3882 The formatting for this should be, and now is: 
3883
3884            for ($i = 0 ; $i &lt; length $key ; $i++)
3885
3886 Thanks to Erik Thaysen for noting this.
3887
3888 -Discovered a new bug involving here-docs during testing!  See BUGS.html.  
3889
3890 -Finally fixed parsing of subroutine attributes (A Perl 5.6 feature).
3891 However, the attributes and prototypes must still be on the same line
3892 as the sub name.
3893 </code></pre>
3894
3895 <h2>2001 07 31</h2>
3896
3897 <pre><code>-Corrected minor, uncommon bug found during routine testing, in which a
3898 blank got inserted between a function name and its opening paren after
3899 a file test operator, but only in the case that the function had not
3900 been previously seen.  Perl uses the existence (or lack thereof) of 
3901 the blank to guess if it is a function call.  That is,
3902    if (-l pid_filename()) {
3903 became
3904    if (-l pid_filename ()) {
3905 which is a syntax error if pid_filename has not been seen by perl.
3906
3907 -If the AutoLoader module is used, perltidy will continue formatting
3908 code after seeing an __END__ line.  Use -nlal to deactivate this feature.  
3909 Likewise, if the SelfLoader module is used, perltidy will continue 
3910 formatting code after seeing a __DATA__ line.  Use -nlsl to
3911 deactivate this feature.  Thanks to Slaven Rezic for this suggestion.
3912
3913 -pod text after __END__ and __DATA__ is now identified by perltidy
3914 so that -dp works correctly.  Thanks to Slaven Rezic for this suggestion.
3915
3916 -The first $VERSION line which might be eval'd by MakeMaker
3917 is now passed through unchanged.  Use -npvl to deactivate this feature.
3918 Thanks to Manfred Winter for this suggestion.
3919
3920 -Improved indentation of nested parenthesized expressions.  Tests have
3921 given favorable results.  Thanks to Wolfgang Weisselberg for helpful
3922 examples.
3923 </code></pre>
3924
3925 <h2>2001 07 23</h2>
3926
3927 <pre><code>-Fixed a very rare problem in which an unwanted semicolon was inserted
3928 due to misidentification of anonymous hash reference curly as a code
3929 block curly.  (No instances of this have been reported; I discovered it
3930 during testing).  A workaround for older versions of perltidy is to use
3931 -nasc.
3932
3933 -Added -icb (-indent-closing-brace) parameter to indent a brace which
3934 terminates a code block to the same level as the previous line.
3935 Suggested by Andrew Cutler.  For example, 
3936
3937        if ($task) {
3938            yyy();
3939            }    # -icb
3940        else {
3941            zzz();
3942            }
3943
3944 -Rewrote error message triggered by an unknown bareword in a print or
3945 printf filehandle position, and added flag -w=0 to prevent issuing this
3946 error message.  Suggested by Byron Jones.
3947
3948 -Added modification to align a one-line 'if' block with similar
3949 following 'elsif' one-line blocks, like this:
3950      if    ( $something eq "simple" )  { &amp;handle_simple }
3951      elsif ( $something eq "hard" )    { &amp;handle_hard }
3952 (Suggested by  Wolfgang Weisselberg).
3953 </code></pre>
3954
3955 <h2>2001 07 02</h2>
3956
3957 <pre><code>-Eliminated all constants with leading underscores because perl 5.005_03
3958 does not support that.  For example, _SPACES changed to XX_SPACES.
3959 Thanks to kromJx for this update.
3960 </code></pre>
3961
3962 <h2>2001 07 01</h2>
3963
3964 <pre><code>-the directory of test files has been moved to a separate distribution
3965 file because it is getting large but is of little interest to most users.
3966 For the current distribution:
3967   perltidy-20010701.tgz        contains the source and docs for perltidy
3968   perltidy-20010701-test.tgz   contains the test files
3969
3970 -fixed bug where temporary file perltidy.TMPI was not being deleted 
3971 when input was from stdin.
3972
3973 -adjusted line break logic to not break after closing brace of an
3974 eval block (suggested by Boris Zentner).
3975
3976 -added flag -gnu (--gnu-style) to give an approximation to the GNU
3977 style as sometimes applied to perl.  The programming style in GNU
3978 'automake' was used as a guide in setting the parameters; these
3979 parameters will probably be adjusted over time.
3980
3981 -an empty code block now has one space for emphasis:
3982   if ( $cmd eq "bg_untested" ) {}    # old
3983   if ( $cmd eq "bg_untested" ) { }   # new
3984 If this bothers anyone, we could create a parameter.
3985
3986 -the -bt (--brace-tightness) parameter has been split into two
3987 parameters to give more control. -bt now applies only to non-BLOCK
3988 braces, while a new parameter -bbt (block-brace-tightness) applies to
3989 curly braces which contain code BLOCKS. The default value is -bbt=0.
3990
3991 -added flag -icp (--indent-closing-paren) which leaves a statement
3992 termination of the form );, };, or ]; indented with the same
3993 indentation as the previous line.  For example,
3994
3995    @month_of_year = (          # default, or -nicp
3996        'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct',
3997        'Nov', 'Dec'
3998    );
3999
4000    @month_of_year = (          # -icp
4001        'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct',
4002        'Nov', 'Dec'
4003        );
4004
4005 -Vertical alignment updated to synchronize with tokens &amp;&amp;, ||,
4006 and, or, if, unless.  Allowable space before forcing
4007 resynchronization has been increased.  (Suggested by  Wolfgang
4008 Weisselberg).
4009
4010 -html corrected to use -nohtml-bold-xxxxxxx or -nhbx to negate bold,
4011 and likewise -nohtml-italic-xxxxxxx or -nhbi to negate italic.  There
4012 was no way to negate these previously.  html documentation updated and
4013 corrected.  (Suggested by  Wolfgang Weisselberg).
4014
4015 -Some modifications have been made which improve the -lp formatting in
4016 a few cases.
4017
4018 -Perltidy now retains or creates a blank line after an =cut to keep
4019 podchecker happy (Suggested by Manfred H. Winter).  This appears to be
4020 a glitch in podchecker, but it was annoying.
4021 </code></pre>
4022
4023 <h2>2001 06 17</h2>
4024
4025 <pre><code>-Added -bli flag to give continuation indentation to braces, like this
4026
4027        if ($bli_flag)
4028          {
4029            extra_indentation();
4030          }
4031
4032 -Corrected an error with the tab (-t) option which caused the last line
4033 of a multi-line quote to receive a leading tab.  This error was in
4034 version 2001 06 08  but not 2001 04 06.  If you formatted a script
4035 with -t with this version, please check it by running once with the
4036 -chk flag and perltidy will scan for this possible error.
4037
4038 -Corrected an invalid pattern (\R should have been just R), changed
4039 $^W =1 to BEGIN {$^W=1} to use warnings in compile phase, and corrected
4040 several unnecessary 'my' declarations. Many thanks to Wolfgang Weisselberg,
4041 2001-06-12, for catching these errors.
4042
4043 -A '-bar' flag has been added to require braces to always be on the
4044 right, even for multi-line if and foreach statements.  For example,
4045 the default formatting of a long if statement would be:
4046
4047        if ($bigwasteofspace1 &amp;&amp; $bigwasteofspace2
4048          || $bigwasteofspace3 &amp;&amp; $bigwasteofspace4)
4049        {
4050            bigwastoftime();
4051        }
4052
4053 With -bar, the formatting is:
4054
4055        if ($bigwasteofspace1 &amp;&amp; $bigwasteofspace2
4056          || $bigwasteofspace3 &amp;&amp; $bigwasteofspace4) {
4057            bigwastoftime();
4058        }
4059 Suggested by Eli Fidler 2001-06-11.
4060
4061 -Uploaded perltidy to sourceforge cvs 2001-06-10.
4062
4063 -An '-lp' flag (--line-up-parentheses) has been added which causes lists
4064 to be indented with extra indentation in the manner sometimes
4065 associated with emacs or the GNU suggestions.  Thanks to Ian Stuart for
4066 this suggestion and for extensive help in testing it. 
4067
4068 -Subroutine call parameter lists are now formatted as other lists.
4069 This should improve formatting of tables being passed via subroutine
4070 calls.  This will also cause full indentation ('-i=n, default n= 4) of
4071 continued parameter list lines rather than just the number of spaces
4072 given with -ci=n, default n=2.
4073
4074 -Added support for hanging side comments.  Perltidy identifies a hanging
4075 side comment as a comment immediately following a line with a side
4076 comment or another hanging side comment.  This should work in most
4077 cases.  It can be deactivated with --no-hanging-side-comments (-nhsc).
4078 The manual has been updated to discuss this.  Suggested by Brad
4079 Eisenberg some time ago, and finally implemented.
4080 </code></pre>
4081
4082 <h2>2001 06 08</h2>
4083
4084 <pre><code>-fixed problem with parsing command parameters containing quoted
4085 strings in .perltidyrc files. (Reported by Roger Espel Llima 2001-06-07).
4086
4087 -added two command line flags, --want-break-after and 
4088 --want-break-before, which allow changing whether perltidy
4089 breaks lines before or after any operators.  Please see the revised 
4090 man pages for details.
4091
4092 -added system-wide configuration file capability.
4093 If perltidy does not find a .perltidyrc command line file in
4094 the current directory, nor in the home directory, it now looks
4095 for '/usr/local/etc/perltidyrc' and then for '/etc/perltidyrc'.
4096 (Suggested by Roger Espel Llima 2001-05-31).
4097
4098 -fixed problem in which spaces were trimmed from lines of a multi-line
4099 quote. (Reported by Roger Espel Llima 2001-05-30).  This is an 
4100 uncommon situation, but serious, because it could conceivably change
4101 the proper function of a script.
4102
4103 -fixed problem in which a semicolon was incorrectly added within 
4104 an anonymous hash.  (Reported by A.C. Yardley, 2001-5-23).
4105 (You would know if this happened, because perl would give a syntax
4106 error for the resulting script).
4107
4108 -fixed problem in which an incorrect error message was produced
4109  after a version number on a 'use' line, like this ( Reported 
4110  by Andres Kroonmaa, 2001-5-14):
4111
4112              use CGI 2.42 qw(fatalsToBrowser);
4113
4114  Other than the extraneous error message, this bug was harmless.
4115 </code></pre>
4116
4117 <h2>2001 04 06</h2>
4118
4119 <pre><code>-fixed serious bug in which the last line of some multi-line quotes or
4120  patterns was given continuation indentation spaces.  This may make
4121  a pattern incorrect unless it uses the /x modifier.  To find
4122  instances of this error in scripts which have been formatted with
4123  earlier versions of perltidy, run with the -chk flag, which has
4124  been added for this purpose (SLH, 2001-04-05).
4125
4126  ** So, please check previously formatted scripts by running with -chk
4127  at least once **
4128
4129 -continuation indentation has been reprogrammed to be hierarchical, 
4130  which improves deeply nested structures.
4131
4132 -fixed problem with undefined value in list formatting (reported by Michael
4133  Langner 2001-04-05)
4134
4135 -Switched to graphical display of nesting in .LOG files.  If an
4136  old format string was "(1 [0 {2", the new string is "{{(".  This
4137  is easier to read and also shows the order of nesting.
4138
4139 -added outdenting of cuddled paren structures, like  ")-&gt;pack(".
4140
4141 -added line break and outdenting of ')-&gt;' so that instead of
4142
4143        $mw-&gt;Label(
4144          -text   =&gt; "perltidy",
4145          -relief =&gt; 'ridge')-&gt;pack;
4146
4147  the current default is:
4148
4149        $mw-&gt;Label(
4150          -text   =&gt; "perltidy",
4151          -relief =&gt; 'ridge'
4152        )-&gt;pack;
4153
4154  (requested by Michael Langner 2001-03-31; in the future this could 
4155  be controlled by a command-line parameter).
4156
4157 -revised list indentation logic, so that lists following an assignment
4158  operator get one full indentation level, rather than just continuation 
4159  indentation.  Also corrected some minor glitches in the continuation 
4160  indentation logic. 
4161
4162 -Fixed problem with unwanted continuation indentation after a blank line 
4163 (reported by Erik Thaysen 2001-03-28):
4164
4165 -minor update to avoid stranding a single '(' on one line
4166 </code></pre>
4167
4168 <h2>2001 03 28:</h2>
4169
4170 <pre><code>-corrected serious error tokenizing filehandles, in which a sub call 
4171 after a print or printf, like this:
4172    print usage() and exit;
4173 became this:
4174    print usage () and exit;
4175 Unfortunately, this converts 'usage' to a filehandle.  To fix this, rerun
4176 perltidy; it will look for this situation and issue a warning. 
4177
4178 -fixed another cuddled-else formatting bug (Reported by Craig Bourne)
4179
4180 -added several diagnostic --dump routines
4181
4182 -added token-level whitespace controls (suggested by Hans Ecke)
4183 </code></pre>
4184
4185 <h2>2001 03 23:</h2>
4186
4187 <pre><code>-added support for special variables of the form ${^WANT_BITS}
4188
4189 -space added between scalar and left paren in 'for' and 'foreach' loops,
4190  (suggestion by Michael Cartmell):
4191
4192    for $i( 1 .. 20 )   # old
4193    for $i ( 1 .. 20 )   # new
4194
4195 -html now outputs cascading style sheets (thanks to suggestion from
4196  Hans Ecke)
4197
4198 -flags -o and -st now work with -html
4199
4200 -added missing -html documentation for comments (noted by Alex Izvorski)
4201
4202 -support for VMS added (thanks to Michael Cartmell for code patches and 
4203   testing)
4204
4205 -v-strings implemented (noted by Hans Ecke and Michael Cartmell; extensive
4206   testing by Michael Cartmell)
4207
4208 -fixed problem where operand may be empty at line 3970 
4209  (\b should be just b in lines 3970, 3973) (Thanks to Erik Thaysen, 
4210  Keith Marshall for bug reports)
4211
4212 -fixed -ce bug (cuddled else), where lines like '} else {' were indented
4213  (Thanks to Shawn Stepper and Rick Measham for reporting this)
4214 </code></pre>
4215
4216 <h2>2001 03 04:</h2>
4217
4218 <pre><code>-fixed undefined value in line 153 (only worked with -I set)
4219 (Thanks to Mike Stok, Phantom of the Opcodes, Ian Ehrenwald, and others)
4220
4221 -fixed undefined value in line 1069 (filehandle problem with perl versions &lt;
4222 5.6) (Thanks to Yuri Leikind, Mike Stok, Michael Holve, Jeff Kolber)
4223 </code></pre>
4224
4225 <h2>2001 03 03:</h2>
4226
4227 <pre><code>-Initial announcement at freshmeat.net; started Change Log
4228 (Unfortunately this version was DOA, but it was fixed the next day)
4229 </code></pre>