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