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