]> git.donarmstrong.com Git - perltidy.git/blob - CHANGES
New upstream version 20170521
[perltidy.git] / CHANGES
1 Perltidy Change Log
2   2017 05 21
3       - Fixed debian #862667: failure to check for perltidy.ERR deletion can lead 
4         to overwriting abritrary files by symlink attack. Perltidy was continuing 
5         to write files after an unlink failure.  Thanks to Don Armstrong 
6         for a patch.
7
8       - Fixed RT #116344, perltidy fails on certain anonymous hash references:
9         in the following code snippet the '?' was misparsed as a pattern 
10         delimiter rather than a ternary operator.
11             return ref {} ? 1 : 0;
12
13       - Fixed RT #113792: misparsing of a fat comma (=>) right after 
14         the __END__ or __DATA__ tokens.  These keywords were getting
15         incorrectly quoted by the following => operator.
16
17       - Fixed RT #118558. Custom Getopt::Long configuration breaks parsing 
18         of perltidyrc.  Perltidy was resetting the users configuration too soon.
19
20       - Fixed RT #119140, failure to parse double diamond operator.  Code to
21         handle this new operator has been added.
22
23       - Fixed RT #120968.  Fixed problem where -enc=utf8 didn't work 
24         with --backup-and-modify-in-place. Thanks to Heinz Knutzen for this patch.
25
26       - Fixed minor formatting issue where one-line blocks for subs with signatures 
27         were unnecesarily broken
28
29       - RT #32905, patch to fix utf-8 error when output was STDOUT. 
30
31       - RT #79947, improved spacing of try/catch/finally blocks. Thanks to qsimpleq
32         for a patch.
33
34       - Fixed #114909, Anonymous subs with signatures and prototypes misparsed as
35         broken ternaries, in which a statement such as this was not being parsed
36         correctly:
37             return sub ( $fh, $out ) : prototype(*$) { ... }
38
39       - Implemented RT #113689, option to introduces spaces after an opening block
40         brace and before a closing block brace. Four new optional controls are
41         added. The first two define the minimum number of blank lines to be
42         inserted 
43
44          -blao=i or --blank-lines-after-opening-block=i
45          -blbc=i or --blank-lines-before-closing-block=i
46
47         where i is an integer, the number of lines (the default is 0).  
48
49         The second two define the types of blocks to which the first two apply 
50
51          -blaol=s or --blank-lines-after-opening-block-list=s
52          -blbcl=s or --blank-lines-before-closing-block-list=s
53     
54         where s is a string of possible block keywords (default is just 'sub',
55         meaning a named subroutine).
56
57         For more information please see the documentation.
58
59       - The method for specifying block types for certain input parameters has
60         been generalized to distinguish between normal named subroutines and
61         anonymous subs.  The keyword for normal subroutines remains 'sub', and
62         the new keyword for anonymous subs is 'asub'. 
63
64       - Minor documentation changes. The BUGS sections now have a link
65         to CPAN where most open bugs and issues can be reviewed and bug reports
66         can be submitted.  The information in the AUTHOR and CREDITS sections of
67         the man pages have been removed from the man pages to streamline the
68         documentation. This information is still in the source code.
69
70   2016 03 02
71       - RT #112534. Corrected a minor problem in which an unwanted newline
72         was placed before the closing brace of an anonymous sub with 
73         a signature, if it was in a list.  Thanks to Dmytro Zagashev.
74
75       - Corrected a minor problem in which occasional extra indentation was
76         given to the closing brace of an anonymous sub in a list when the -lp 
77         parameter was set.
78
79   2016 03 01
80       - RT #104427. Added support for signatures.
81
82       - RT #111512.  Changed global warning flag $^W = 1 to use warnings;
83         Thanks to Dmytro Zagashev.
84
85       - RT #110297, added support for new regexp modifier /n
86         Thanks to Dmytro Zagashev.
87
88       - RT #111519.  The -io (--indent-only) and -dac (--delete-all-comments)
89         can now both be used in one pass. Thanks to Dmitry Veltishev.
90
91       - Patch to avoid error message with 'catch' used by TryCatch, as in
92            catch($err){
93               # do something
94            }
95         Thanks to Nick Tonkin.
96
97       - RT #32905, UTF-8 coding is now more robust. Thanks to qsimpleq
98         and Dmytro for patches.
99
100       - RT #106885. Added string bitwise operators ^. &. |. ~. ^.= &.= |.=
101  
102       - Fixed RT #107832 and #106492, lack of vertical alignment of two lines
103         when -boc flag (break at old commas) is set.  This bug was 
104         inadvertantly introduced in previous bug fix RT #98902. 
105
106       - Some common extensions to Perl syntax are handled better.
107         In particular, the following snippet is now foratted cleanly:
108
109           method deposit( Num $amount) {
110               $self->balance( $self->balance + $amount );
111           }
112
113         A new flag -xs (--extended-syntax) was added to enable this, and the default
114         is to use -xs. 
115
116         In previous versions, and now only when -nxs is set, this snippet of code
117         generates the following error message:
118
119         "syntax error at ') {', didn't see one of: case elsif for foreach given if switch unless until when while"
120
121   2015 08 15
122       - Fixed RT# 105484, Invalid warning about 'else' in 'switch' statement.  The
123         warning happened if a 'case' statement did not use parens.
124
125       - Fixed RT# 101547, misparse of // caused error message.  Also..
126
127       - Fixed RT# 102371, misparse of // caused unwated space in //=
128
129       - Fixed RT# 100871, "silent failure of HTML Output on Windows". 
130         Changed calls to tempfile() from:
131           my ( $fh_tmp, $tmpfile ) = tempfile();
132         to have the full path name:
133           my ( $fh_tmp, $tmpfile ) = File::Temp::tempfile()
134         because of problems in the Windows version reported by Dean Pearce.
135
136       - Fixed RT# 99514, calling the perltidy module multiple times with 
137         a .perltidyrc file containing the parameter --output-line-ending 
138         caused a crash.  This was a glitch in the memoization logic. 
139
140       - Fixed RT#99961, multiple lines inside a cast block caused unwanted
141         continuation indentation.  
142
143       - RT# 32905, broken handling of UTF-8 strings. 
144         A new flag -utf8 causes perltidy assume UTF-8 encoding for input and 
145         output of an io stream.  Thanks to Sebastian Podjasek for a patch.  
146         This feature may not work correctly in older versions of Perl. 
147         It worked in a linux version 5.10.1 but not in a Windows version 5.8.3 (but
148         otherwise perltidy ran correctly).
149
150       - Warning files now report perltidy VERSION. Suggested by John Karr.
151  
152       - Fixed long flag --nostack-closing-tokens (-nsct has always worked though). 
153         This was due to a typo.  This also fixed --nostack-opening-tokens to 
154         behave correctly.  Thanks to Rob Dixon.
155
156   2014 07 11
157       - Fixed RT #94902: abbreviation parsing in .perltidyrc files was not
158         working for multi-line abbreviations.  Thanks to Eric Fung for 
159         supplying a patch. 
160   
161       - Fixed RT #95708, misparsing of a hash when the first key was a perl
162         keyword, causing a semicolon to be incorrectly added.
163
164       - Fixed RT #94338 for-loop in a parenthesized block-map.  A code block within
165         parentheses of a map, sort, or grep function was being mistokenized.  In 
166         rare cases this could produce in an incorrect error message.  The fix will
167         produce some minor formatting changes.  Thanks to Daniel Trizen 
168         discovering and documenting this.
169
170       - Fixed RT #94354, excess indentation for stacked tokens.  Thanks to 
171         Colin Williams for supplying a patch.
172
173       - Added support for experimental postfix dereferencing notation introduced in
174         perl 5.20. RT #96021.
175
176       - Updated documentation to clarify the behavior of the -io flag
177         in response to RT #95709.  You can add -noll or -l=0 to prevent 
178         long comments from being outdented when -io is used.
179
180       - Added a check to prevent a problem reported in RT #81866, where large
181         scripts which had been compressed to a single line could not be formatted
182         because of a check for VERSION for MakeMaker. The workaround was to 
183         use -nvpl, but this shouldn't be necessary now.
184
185       - Fixed RT #96101; Closing brace of anonymous sub in a list was being
186         indented.  For example, the closing brace of the anonymous sub below 
187         will now be lined up with the word 'callback'.  This problem 
188         occured if there was no comma after the closing brace of the anonymous sub.  
189         This update may cause minor changes to formatting of code with lists 
190         of anonymous subs, especially TK code.
191     
192         # OLD
193         my @menu_items = (
194
195             #...
196             {
197                 path     => '/_Operate/Transcode and split',
198                 callback => sub {
199                     return 1 if not $self->project_opened;
200                     $self->comp('project')->transcode( split => 1 );
201                   }
202             }
203         );
204
205         # NEW
206         my @menu_items = (
207
208             #...
209             {
210                 path     => '/_Operate/Transcode and split',
211                 callback => sub {
212                     return 1 if not $self->project_opened;
213                     $self->comp('project')->transcode( split => 1 );
214                 }
215             }
216         );
217
218   2014 03 28
219       - Fixed RT #94190 and debian Bug #742004: perltidy.LOG file left behind.
220         Thanks to George Hartzell for debugging this.  The problem was
221         caused by the memoization speedup patch in version 20121207.  An
222         unwanted flag was being set which caused a LOG to be written if 
223         perltidy was called multiple times.
224
225       - New default behavior for LOG files: If the source is from an array or 
226         string (through a call to the perltidy module) then a LOG output is only
227         possible if a logfile stream is specified.  This is to prevent 
228         unexpected perltidy.LOG files. 
229
230       - Fixed debian Bug #740670, insecure temporary file usage.  File::Temp is now
231         used to get a temporary file.  Thanks to Don Anderson for a patch.
232   
233       - Any -b (--backup-and-modify-in-place) flag is silently ignored when a 
234         source stream, destination stream, or standard output is used.  
235         This is because the -b flag may have been in a .perltidyrc file and 
236         warnings break Test::NoWarnings.  Thanks to Marijn Brand.
237
238   2013 09 22
239       - Fixed RT #88020. --converge was not working with wide characters.
240
241       - Fixed RT #78156. package NAMESPACE VERSION syntax not accepted.
242
243       - First attempt to fix RT #88588.  INDEX END tag change in pod2html breaks 
244         perltidy -html. I put in a patch which should work but I don't yet have
245         a way of testing it.
246
247   2013 08 06
248       - Fixed RT #87107, spelling
249
250   2013 08 05
251       - Fixed RT #87502, incorrect of parsing of smartmatch before hash brace
252   
253       - Added feature request RT #87330, trim whitespace after POD.
254         The flag -trp (--trim-pod) will trim trailing whitespace from lines of POD
255
256   2013 07 17
257       - Fixed RT #86929, #86930, missing lhs of assignment.
258
259       - Fixed RT #84922, moved pod from Tidy.pm into Tidy.pod
260
261   2012 12 07
262      - The flag -cab=n or --comma-arrow-breakpoints=n has been generalized
263        to give better control over breaking open short containers.  The
264        possible values are now:
265
266          n=0 break at all commas after =>  
267          n=1 stable: break at all commas after => if container is open,
268              EXCEPT FOR one-line containers
269          n=2 break at all commas after =>, BUT try to form the maximum
270              maximum one-line container lengths
271          n=3 do not treat commas after => specially at all 
272          n=4 break everything: like n=0 but also break a short container with
273              a => not followed by a comma
274          n=5 stable: like n=1 but ALSO break at open one-line containers (default)
275
276        New values n=4 and n=5 have been added to allow short blocks to be
277        broken open.  The new default is n=5, stable.  It should more closely
278        follow the breaks in the input file, and previously formatted code
279        should remain unchanged.  If this causes problems use -cab=1 to recover 
280        the former behavior.  Thanks to Tony Maszeroski for the suggestion.
281
282        To illustrate the need for the new options, if perltidy is given
283        the following code, then the old default (-cab=1) was to close up 
284        the 'index' container even if it was open in the source.  The new 
285        default (-cab=5) will keep it open if it was open in the source.
286
287         our $fancypkg = {
288             'ALL' => {
289                 'index' => {
290                     'key' => 'value',
291                 },
292                 'alpine' => {
293                     'one'   => '+',
294                     'two'   => '+',
295                     'three' => '+',
296                 },
297             }
298         };
299
300      - New debug flag --memoize (-mem).  This version contains a 
301        patch supplied by Jonathan Swartz which can significantly speed up
302        repeated calls to Perl::Tidy::perltidy in a single process by caching
303        the result of parsing the formatting parameters.  A factor of up to 10
304        speedup was achieved for masontidy (https://metacpan.org/module/masontidy).
305        The memoization patch is on by default but can be deactivated for 
306        testing with -nmem (or --no-memoize).
307
308      - New flag -tso (--tight-secret-operators) causes certain perl operator
309        sequences (secret operators) to be formatted "tightly" (without spaces).  
310        The most common of these are 0 +  and + 0 which become 0+ and +0.  The
311        operators currently modified by this flag are: 
312             =( )=  0+  +0  ()x!! ~~<>  ,=>
313        Suggested by by Philippe Bruhat. See https://metacpan.org/module/perlsecret
314        This flag is off by default.
315    
316      - New flag -vmll (--variable-maximum-line-length) makes the maximum
317        line length increase with the nesting depth of a line of code.  
318        Basically, it causes the length of leading whitespace to be ignored when
319        setting line breaks, so the formatting of a block of code is independent
320        of its nesting depth.  Try this option if you have deeply nested 
321        code or data structures, perhaps in conjunction with the -wc flag
322        described next.  The default is not todo this.
323  
324      - New flag -wc=n (--whitespace-cycle=n) also addresses problems with
325        very deeply nested code and data structures.  When this parameter is
326        used and the nesting depth exceeds the value n, the leading whitespace 
327        will be reduced and start at 1 again.  The result is that deeply
328        nested blocks of code will shift back to the left. This occurs cyclically 
329        to any nesting depth.  This flag may be used either with or without -vmll.
330        The default is not to use this (-wc=0).
331
332      - Fixed RT #78764, error parsing smartmatch operator followed by anonymous
333        hash or array and then a ternary operator; two examples:
334
335         qr/3/ ~~ ['1234'] ? 1 : 0;
336         map { $_ ~~ [ '0', '1' ] ? 'x' : 'o' } @a;
337
338      - Fixed problem with specifying spaces around arrows using -wls='->'
339        and -wrs='->'.  Thanks to Alain Valleton for documenting this problem. 
340
341      - Implemented RT #53183, wishlist, lines of code with the same indentation
342        level which are contained with multiple stacked opening and closing tokens
343        (requested with flags -sot -sct) now have reduced indentation.  
344
345         # Default
346         $sender->MailMsg(
347             {
348                 to      => $addr,
349                 subject => $subject,
350                 msg     => $body
351             }
352         );
353
354         # OLD: perltidy -sot -sct 
355         $sender->MailMsg( {
356                 to      => $addr,
357                 subject => $subject,
358                 msg     => $body
359         } );
360
361         # NEW: perltidy -sot -sct 
362         $sender->MailMsg( {
363             to      => $addr,
364             subject => $subject,
365             msg     => $body
366         } );
367
368      - New flag -act=n (--all-containers-tightness=n) is an abbreviation for
369        -pt=n -sbt=n -bt=n -bbt=n, where n=0,1, or 2.  It simplifies input when all
370        containers have the same tightness. Using the same example:
371
372         # NEW: perltidy -sot -sct -act=2
373         $sender->MailMsg({
374             to      => $addr,
375             subject => $subject,
376             msg     => $body
377         });
378
379      - New flag -sac (--stack-all-containers) is an abbreviation for -sot -sct
380        This is part of wishlist item RT #53183. Using the same example again:
381
382         # NEW: perltidy -sac -act=2
383         $sender->MailMsg({
384             to      => $addr,
385             subject => $subject,
386             msg     => $body
387         });
388
389       - new flag -scbb (--stack-closing-block-brace) causes isolated closing 
390         block braces to stack as in the following example. (Wishlist item RT#73788)
391
392         DEFAULT:
393         for $w1 (@w1) {
394             for $w2 (@w2) {
395                 for $w3 (@w3) {
396                     for $w4 (@w4) {
397                         push( @lines, "$w1 $w2 $w3 $w4\n" );
398                     }
399                 }
400             }
401         }
402
403         perltidy -scbb:
404         for $w1 (@w1) {
405             for $w2 (@w2) {
406                 for $w3 (@w3) {
407                     for $w4 (@w4) {
408                         push( @lines, "$w1 $w2 $w3 $w4\n" );
409                     } } } }
410
411        There is, at present, no flag to place these closing braces at the end
412        of the previous line. It seems difficult to develop good rules for 
413        doing this for a wide variety of code and data structures.
414
415      - Parameters defining block types may use a wildcard '*' to indicate
416        all block types.  Previously it was not possible to include bare blocks.
417  
418      - A flag -sobb (--stack-opening-block-brace) has been introduced as an
419        alias for -bbvt=2 -bbvtl='*'.  So for example the following test code:
420
421        {{{{{{{ $testing }}}}}}}
422
423        cannot be formatted as above but can at least be kept vertically compact 
424        using perltidy -sobb -scbb
425
426        {   {   {   {   {   {   {   $testing
427                                } } } } } } }
428
429        Or even, perltidy -sobb -scbb -i=1 -bbt=2
430        {{{{{{{$testing
431              }}}}}}}
432
433
434      - Error message improved for conflicts due to -pbp; thanks to Djun Kim.
435   
436      - Fixed RT #80645, error parsing special array name '@$' when used as 
437        @{$} or $#{$}
438  
439      - Eliminated the -chk debug flag which was included in version 20010406 to
440        do a one-time check for a bug with multi-line quotes.  It has not been
441        needed since then.
442
443      - Numerous other minor formatting improvements.
444
445   2012 07 14
446      - Added flag -iscl (--ignore-side-comment-lengths) which causes perltidy 
447        to ignore the length of side comments when setting line breaks, 
448        RT #71848.  The default is to include the length of side comments when
449        breaking lines to stay within the length prescribed by the -l=n
450        maximum line length parameter.  For example,
451
452          Default behavior on a single line with long side comment:
453             $vmsfile =~ s/;[\d\-]*$//
454               ;    # Clip off version number; we can use a newer version as well
455    
456          perltidy -iscl leaves the line intact:
457
458             $vmsfile =~ s/;[\d\-]*$//; # Clip off version number; we can use a newer version as well
459
460      - Fixed RT #78182, side effects with STDERR.  Error handling has been
461        revised and the documentation has been updated.  STDERR can now be 
462        redirected to a string reference, and perltidy now returns an 
463        error flag instead of calling die when input errors are detected. 
464        If the error flag is set then no tidied output was produced.
465        See man Perl::Tidy for an example.
466
467      - Fixed RT #78156, erroneous warning message for package VERSION syntax.
468
469      - Added abbreviations -conv (--converge) to simplify iteration control.
470        -conv is equivalent to -it=4 and will insure that the tidied code is
471        converged to its final state with the minimum number of iterations.
472
473      - Minor formatting modifications have been made to insure convergence.
474
475      - Simplified and hopefully improved the method for guessing the starting 
476        indentation level of entabbed code.  Added flag -dt=n (--default_tabsize=n) 
477        which might be helpful if the guessing method does not work well for
478        some editors.
479
480      - Added support for stacked labels, upper case X/B in hex and binary, and
481        CORE:: namespace.
482
483      - Eliminated warning messages for using keyword names as constants.
484
485   2012 07 01
486      - Corrected problem introduced by using a chomp on scalar references, RT #77978
487
488      - Added support for Perl 5.14 package block syntax, RT #78114.
489
490      - A convergence test is made if three or more iterations are requested with
491        the -it=n parameter to avoid wasting computer time.  Several hundred Mb of
492        code gleaned from the internet were searched with the results that: 
493         - It is unusual for two iterations to be required unless a major 
494           style change is being made. 
495         - Only one case has been found where three iterations were required.  
496         - No cases requiring four iterations have been found with this version.
497        For the previous version several cases where found the results could
498        oscillate between two semi-stable states. This version corrects this.
499
500        So if it is important that the code be converged it is okay to set -it=4
501        with this version and it will probably stop after the second iteration.
502
503      - Improved ability to identify and retain good line break points in the
504        input stream, such as at commas and equals. You can always tell 
505        perltidy to ignore old breakpoints with -iob.  
506
507      - Fixed glitch in which a terminal closing hash brace followed by semicolon
508        was not outdented back to the leading line depth like other closing
509        tokens.  Thanks to Keith Neargarder for noting this.
510
511          OLD:
512             my ( $pre, $post ) = @{
513                 {
514                     "pp_anonlist" => [ "[", "]" ],
515                     "pp_anonhash" => [ "{", "}" ]
516                 }->{ $kid->ppaddr }
517               };   # terminal brace
518
519          NEW:
520             my ( $pre, $post ) = @{
521                 {
522                     "pp_anonlist" => [ "[", "]" ],
523                     "pp_anonhash" => [ "{", "}" ]
524                 }->{ $kid->ppaddr }
525             };    # terminal brace
526
527      - Removed extra indentation given to trailing 'if' and 'unless' clauses 
528        without parentheses because this occasionally produced undesirable 
529        results.  This only applies where parens are not used after the if or
530        unless.
531
532         OLD:
533             return undef
534               unless my ( $who, $actions ) =
535                   $clause =~ /^($who_re)((?:$action_re)+)$/o; 
536     
537         NEW:
538             return undef
539               unless my ( $who, $actions ) =
540               $clause =~ /^($who_re)((?:$action_re)+)$/o;
541
542   2012 06 19
543      - Updated perltidy to handle all quote modifiers defined for perl 5 version 16.
544
545      - Side comment text in perltidyrc configuration files must now begin with
546        at least one space before the #.  Thus:
547
548        OK:
549          -l=78 # Max line width is 78 cols
550        BAD: 
551          -l=78# Max line width is 78 cols
552
553        This is probably true of almost all existing perltidyrc files, 
554        but if you get an error message about bad parameters
555        involving a '#' the first time you run this version, please check the side
556        comments in your perltidyrc file, and add a space before the # if necessary.
557        You can quickly see the contents your perltidyrc file, if any, with the
558        command:
559
560          perltidy -dpro
561
562        The reason for this change is that some parameters naturally involve
563        the # symbol, and this can get interpreted as a side comment unless the
564        parameter is quoted.  For example, to define -sphb=# it used to be necessary
565        to write
566          -sbcp='#'
567        to keep the # from becoming part of a comment.  This was causing 
568        trouble for new users.  Now it can also be written without quotes: 
569          -sbcp=#
570
571      - Fixed bug in processing some .perltidyrc files containing parameters with
572        an opening brace character, '{'.  For example the following was
573        incorrectly processed:
574           --static-block-comment-prefix="^#{2,}[^\s#]"
575        Thanks to pdagosto.
576
577      - Added flag -boa (--break-at-old-attribute-breakpoints) which retains
578        any existing line breaks at attribute separation ':'. This is now the
579        default, use -nboa to deactivate.  Thanks to Daphne Phister for the patch.  
580        For example, given the following code, the line breaks at the ':'s will be
581        retained:
582        
583                         my @field
584                           : field
585                           : Default(1)
586                           : Get('Name' => 'foo') : Set('Name');
587
588        whereas the previous version would have output a single line.  If
589        the attributes are on a single line then they will remain on a single line.
590  
591      - Added new flags --blank-lines-before-subs=n (-blbs=n) and
592        --blank-lines-before-packages=n (-blbp=n) to put n blank lines before
593        subs and packages.  The old flag -bbs is now equivalent to -blbs=1 -blbp=1.
594        and -nbbs is equivalent to -blbs=0 -blbp=0. Requested by M. Schwern and
595        several others.
596
597      - Added feature -nsak='*' meaning no space between any keyword and opening 
598        paren.  This avoids listing entering a long list of keywords.  Requested
599        by M. Schwern.
600
601      - Added option to delete a backup of original file with in-place-modify (-b)
602        if there were no errors.  This can be requested with the flag -bext='/'.  
603        See documentation for details.  Requested by M. Schwern and others.
604
605      - Fixed bug where the module postfilter parameter was not applied when -b 
606        flag was used.  This was discovered during testing.
607
608      - Fixed in-place-modify (-b) to work with symbolic links to source files.
609        Thanks to Ted Johnson.
610
611      - Fixed bug where the Perl::Tidy module did not allow -b to be used 
612        in some cases.
613
614      - No extra blank line is added before a comment which follows
615        a short line ending in an opening token, for example like this:
616         OLD:
617                 if (
618
619                     # unless we follow a blank or comment line
620                     $last_line_leading_type !~ /^[#b]$/
621                     ...
622
623         NEW:
624                 if (
625                     # unless we follow a blank or comment line
626                     $last_line_leading_type !~ /^[#b]$/
627                     ...
628
629         The blank is not needed for readability in these cases because there
630         already is already space above the comment.  If a blank already 
631         exists there it will not be removed, so this change should not 
632         change code which has previously been formatted with perltidy. 
633         Thanks to R.W.Stauner.
634
635      - Likewise, no extra blank line is added above a comment consisting of a
636        single #, since nothing is gained in readability.
637
638      - Fixed error in which a blank line was removed after a #>>> directive. 
639        Thanks to Ricky Morse.
640
641      - Unnecessary semicolons after given/when/default blocks are now removed.
642
643      - Fixed bug where an unwanted blank line could be added before
644        pod text in __DATA__ or __END__ section.  Thanks to jidani.
645
646      - Changed exit flags from 1 to 0 to indicate success for -help, -version, 
647        and all -dump commands.  Also added -? as another way to dump the help.
648        Requested by Keith Neargarder.
649
650      - Fixed bug where .ERR and .LOG files were not written except for -it=2 or more
651
652      - Fixed bug where trailing blank lines at the end of a file were dropped when
653        -it>1.
654
655      - Fixed bug where a line occasionally ended with an extra space. This reduces
656        rhe number of instances where a second iteration gives a result different
657        from the first. 
658
659      - Updated documentation to note that the Tidy.pm module <stderr> parameter may
660        not be a reference to SCALAR or ARRAY; it must be a file.
661  
662      - Syntax check with perl now work when the Tidy.pm module is processing
663        references to arrays and strings.  Thanks to Charles Alderman.
664
665      - Zero-length files are no longer processed due to concerns for data loss
666        due to side effects in some scenarios.
667
668      - block labels, if any, are now included in closing side comment text
669        when the -csc flag is used.  Suggested by Aaron.  For example, 
670        the label L102 in the following block is now included in the -csc text:
671
672           L102: for my $i ( 1 .. 10 ) {
673             ...
674           } ## end L102: for my $i ( 1 .. 10 )
675
676   2010 12 17
677      - added new flag -it=n or --iterations=n
678        This flag causes perltidy to do n complete iterations.  
679        For most purposes the default of n=1 should be satisfactory.  However n=2
680        can be useful when a major style change is being made, or when code is being
681        beautified on check-in to a source code control system.  The run time will be
682        approximately proportional to n, and it should seldom be necessary to use a
683        value greater than n=2.  Thanks to Jonathan Swartz
684
685      - A configuration file pathname begins with three dots, e.g.
686        ".../.perltidyrc", indicates that the file should be searched for starting
687        in the current directory and working upwards. This makes it easier to have
688        multiple projects each with their own .perltidyrc in their root directories.
689        Thanks to Jonathan Swartz for this patch.
690
691      - Added flag --notidy which disables all formatting and causes the input to be
692        copied unchanged.  This can be useful in conjunction with hierarchical
693        F<.perltidyrc> files to prevent unwanted tidying.
694        Thanks to Jonathan Swartz for this patch.
695
696      - Added prefilters and postfilters in the call to the Tidy.pm module.
697        Prefilters and postfilters. The prefilter is a code reference that 
698        will be applied to the source before tidying, and the postfilter 
699        is a code reference to the result before outputting.  
700
701        Thanks to Jonathan Swartz for this patch.  He writes:
702        This is useful for all manner of customizations. For example, I use
703        it to convert the 'method' keyword to 'sub' so that perltidy will work for
704        Method::Signature::Simple code:
705
706        Perl::Tidy::perltidy(
707           prefilter => sub { $_ = $_[0]; s/^method (.*)/sub $1 \#__METHOD/gm; return $_ },
708           postfilter => sub { $_ = $_[0]; s/^sub (.*?)\s* \#__METHOD/method $1/gm; return $_ }
709        );
710
711      - The starting indentation level of sections of code entabbed with -et=n
712        is correctly guessed if it was also produced with the same -et=n flag.  This
713        keeps the indentation stable on repeated formatting passes within an editor.
714        Thanks to Sam Kington and Glenn.
715
716      - Functions with prototype '&' had a space between the function and opening
717        peren.  This space now only occurs if the flag --space-function-paren (-sfp)
718        is set.  Thanks to Zrajm Akfohg.
719
720      - Patch to never put spaces around a bare word in braces beginning with ^ as in:
721          my $before = ${^PREMATCH};
722        even if requested with the -bt=0 flag because any spaces cause a syntax error in perl.
723        Thanks to Fabrice Dulanoy.
724
725   2009 06 16
726      - Allow configuration file to be 'perltidy.ini' for Windows systems.
727        i.e. C:\Documents and Settings\User\perltidy.ini
728        and added documentation for setting configuation file under Windows in man
729        page.  Thanks to Stuart Clark.
730
731      - Corrected problem of unwanted semicolons in hash ref within given/when code.
732       Thanks to Nelo Onyiah.
733
734      - added new flag -cscb or --closing-side-comments-balanced
735       When using closing-side-comments, and the closing-side-comment-maximum-text
736       limit is exceeded, then the comment text must be truncated.  Previous
737       versions of perltidy terminate with three dots, and this can still be
738       achieved with -ncscb:
739    
740        perltidy -csc -ncscb
741
742        } ## end foreach my $foo (sort { $b cmp $a ...
743    
744       However this causes a problem with older editors which cannot recognize
745       comments or are not configured to doso because they cannot "bounce" around in
746       the text correctly.  The B<-cscb> flag tries to help them by 
747       appending appropriate terminal balancing structure:
748    
749        perltidy -csc -cscb
750
751        } ## end foreach my $foo (sort { $b cmp $a ... })
752    
753       Since there is much to be gained and little to be lost by doing this,
754       the default is B<-cscb>.  Use B<-ncscb> if you do not want this.
755
756       Thanks to Daniel Becker for suggesting this option.
757
758      - After an isolated closing eval block the continuation indentation will be
759        removed so that the braces line up more like other blocks.  Thanks to Yves Orton.
760
761      OLD:
762         eval {
763             #STUFF;
764             1;    # return true
765           }  
766           or do {
767             #handle error
768           };
769
770      NEW:
771         eval {
772             #STUFF;
773             1;    # return true
774         } or do {
775             #handle error
776         };
777
778      -A new flag -asbl (or --opening-anonymous-sub-brace-on-new-line) has
779       been added to put the opening brace of anonymous sub's on a new line,
780       as in the following snippet:
781
782         my $code = sub
783         {
784             my $arg = shift;
785             return $arg->(@_);
786         };
787
788       This was not possible before because the -sbl flag only applies to named
789       subs. Thanks to Benjamin Krupp.
790
791      -Fix tokenization bug with the following snippet
792        print 'hi' if { x => 1, }->{x};
793       which resulted in a semicolon being added after the comma.  The workaround
794       was to use -nasc, but this is no longer necessary.  Thanks to Brian Duggan. 
795
796      -Fixed problem in which an incorrect error message could be triggered
797      by the (unusual) combination of parameters  -lp -i=0 -l=2 -ci=0 for
798      example.  Thanks to Richard Jelinek.
799
800      -A new flag --keep-old-blank-lines=n has been added to
801      give more control over the treatment of old blank lines in
802      a script.  The manual has been revised to discuss the new
803      flag and clarify the treatment of old blank lines.  Thanks
804      to Oliver Schaefer.
805
806   2007 12 05
807      -Improved support for perl 5.10: New quote modifier 'p', new block type UNITCHECK, 
808      new keyword break, improved formatting of given/when.
809
810      -Corrected tokenization bug of something like $var{-q}.
811
812      -Numerous minor formatting improvements.
813
814      -Corrected list of operators controlled by -baao -bbao to include
815        . : ? && || and or err xor
816
817      -Corrected very minor error in log file involving incorrect comment
818      regarding need for upper case of labels.  
819
820      -Fixed problem where perltidy could run for a very long time
821      when given certain non-perl text files.
822
823      -Line breaks in un-parenthesized lists now try to follow
824      line breaks in the input file rather than trying to fill
825      lines.  This usually works better, but if this causes
826      trouble you can use -iob to ignore any old line breaks.
827      Example for the following input snippet:
828
829         print
830         "conformability (Not the same dimension)\n",
831         "\t", $have, " is ", text_unit($hu), "\n",
832         "\t", $want, " is ", text_unit($wu), "\n",
833         ;
834
835       OLD:
836         print "conformability (Not the same dimension)\n", "\t", $have, " is ",
837           text_unit($hu), "\n", "\t", $want, " is ", text_unit($wu), "\n",;
838
839       NEW:
840         print "conformability (Not the same dimension)\n",
841           "\t", $have, " is ", text_unit($hu), "\n",
842           "\t", $want, " is ", text_unit($wu), "\n",
843           ;
844
845   2007 08 01
846      -Added -fpsc option (--fixed-position-side-comment). Thanks to Ueli Hugenschmidt. 
847      For example -fpsc=40 tells perltidy to put side comments in column 40
848      if possible.  
849
850      -Added -bbao and -baao options (--break-before-all-operators and
851      --break-after-all-operators) to simplify command lines and configuration
852      files.  These define an initial preference for breaking at operators which can
853      be modified with -wba and -wbb flags.  For example to break before all operators
854      except an = one could use --bbao -wba='=' rather than listing every
855      single perl operator (except =) on a -wbb flag.
856
857      -Added -kis option (--keep-interior-semicolons).  Use the B<-kis> flag
858      to prevent breaking at a semicolon if there was no break there in the
859      input file.  To illustrate, consider the following input lines:
860
861         dbmclose(%verb_delim); undef %verb_delim;
862         dbmclose(%expanded); undef %expanded;
863         dbmclose(%global); undef %global;
864
865      Normally these would be broken into six lines, but 
866      perltidy -kis gives:
867
868         dbmclose(%verb_delim); undef %verb_delim;
869         dbmclose(%expanded);   undef %expanded;
870         dbmclose(%global);     undef %global;
871  
872      -Improved formatting of complex ternary statements, with indentation
873      of nested statements.  
874       OLD:
875         return defined( $cw->{Selected} )
876           ? (wantarray)
877           ? @{ $cw->{Selected} }
878           : $cw->{Selected}[0]
879           : undef;
880
881       NEW:
882         return defined( $cw->{Selected} )
883           ? (wantarray)
884               ? @{ $cw->{Selected} }
885               : $cw->{Selected}[0]
886           : undef;
887
888      -Text following un-parenthesized if/unless/while/until statements get a
889      full level of indentation.  Suggested by Jeff Armstorng and others. 
890      OLD:
891         return $ship->chargeWeapons("phaser-canon")
892           if $encounter->description eq 'klingon'
893           and $ship->firepower >= $encounter->firepower
894           and $location->status ne 'neutral';
895      NEW:
896         return $ship->chargeWeapons("phaser-canon")
897           if $encounter->description eq 'klingon'
898               and $ship->firepower >= $encounter->firepower
899               and $location->status ne 'neutral';
900
901   2007 05 08
902      -Fixed bug where #line directives were being indented.  Thanks to
903      Philippe Bruhat.
904
905   2007 05 04
906      -Fixed problem where an extra blank line was added after an =cut when either
907      (a) the =cut started (not stopped) a POD section, or (b) -mbl > 1. 
908      Thanks to J. Robert Ray and Bill Moseley.
909
910   2007 04 24
911      -ole (--output-line-ending) and -ple (--preserve-line-endings) should
912      now work on all systems rather than just unix systems. Thanks to Dan
913      Tyrell.
914
915      -Fixed problem of a warning issued for multiple subs for BEGIN subs
916      and other control subs. Thanks to Heiko Eissfeldt.
917  
918      -Fixed problem where no space was introduced between a keyword or
919      bareword and a colon, such as:
920
921      ( ref($result) eq 'HASH' && !%$result ) ? undef: $result;
922
923      Thanks to Niek.
924
925      -Added a utility program 'break_long_quotes.pl' to the examples directory of
926      the distribution.  It breaks long quoted strings into a chain of concatenated
927      sub strings no longer than a selected length.  Suggested by Michael Renner as
928      a perltidy feature but was judged to be best done in a separate program.
929
930      -Updated docs to remove extra < and >= from list of tokens 
931      after which breaks are made by default.  Thanks to Bob Kleemann.
932
933      -Removed improper uses of $_ to avoid conflicts with external calls, giving
934      error message similar to:
935         Modification of a read-only value attempted at 
936         /usr/share/perl5/Perl/Tidy.pm line 6907.
937      Thanks to Michael Renner.
938
939      -Fixed problem when errorfile was not a plain filename or filehandle
940      in a call to Tidy.pm.  The call
941      perltidy(source => \$input, destination => \$output, errorfile => \$err);
942      gave the following error message:
943       Not a GLOB reference at /usr/share/perl5/Perl/Tidy.pm line 3827.
944      Thanks to Michael Renner and Phillipe Bruhat.
945
946      -Fixed problem where -sot would not stack an opening token followed by
947      a side comment.  Thanks to Jens Schicke.
948
949      -improved breakpoints in complex math and other long statements. Example:
950      OLD:
951         return
952           log($n) + 0.577215664901532 + ( 1 / ( 2 * $n ) ) -
953           ( 1 / ( 12 * ( $n**2 ) ) ) + ( 1 / ( 120 * ( $n**4 ) ) );
954      NEW:
955         return
956           log($n) + 0.577215664901532 +
957           ( 1 / ( 2 * $n ) ) -
958           ( 1 / ( 12 * ( $n**2 ) ) ) +
959           ( 1 / ( 120 * ( $n**4 ) ) );
960
961      -more robust vertical alignment of complex terminal else blocks and ternary
962      statements.
963
964   2006 07 19
965      -Eliminated bug where a here-doc invoked through an 'e' modifier on a pattern
966      replacement text was not recognized.  The tokenizer now recursively scans
967      replacement text (but does not reformat it).
968
969      -improved vertical alignment of terminal else blocks and ternary statements.
970       Thanks to Chris for the suggestion. 
971
972       OLD:
973         if    ( IsBitmap() ) { return GetBitmap(); }
974         elsif ( IsFiles() )  { return GetFiles(); }
975         else { return GetText(); }
976
977       NEW:
978         if    ( IsBitmap() ) { return GetBitmap(); }
979         elsif ( IsFiles() )  { return GetFiles(); }
980         else                 { return GetText(); }
981
982       OLD:
983         $which_search =
984             $opts{"t"} ? 'title'
985           : $opts{"s"} ? 'subject'
986           : $opts{"a"} ? 'author'
987           : 'title';
988
989       NEW:
990         $which_search =
991             $opts{"t"} ? 'title'
992           : $opts{"s"} ? 'subject'
993           : $opts{"a"} ? 'author'
994           :              'title';
995
996      -improved indentation of try/catch blocks and other externally defined
997      functions accepting a block argument.  Thanks to jae.
998
999      -Added support for Perl 5.10 features say and smartmatch.
1000
1001      -Added flag -pbp (--perl-best-practices) as an abbreviation for parameters
1002      suggested in Damian Conway's "Perl Best Practices".  -pbp is the same as:
1003
1004         -l=78 -i=4 -ci=4 -st -se -vt=2 -cti=0 -pt=1 -bt=1 -sbt=1 -bbt=1 -nsfs -nolq
1005         -wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = 
1006               **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="
1007
1008       Please note that the -st here restricts input to standard input; use
1009       -nst if necessary to override.
1010
1011      -Eliminated some needless breaks at equals signs in -lp indentation.
1012
1013         OLD:
1014             $c =
1015               Math::Complex->make(LEFT + $x * (RIGHT - LEFT) / SIZE,
1016                                   TOP + $y * (BOTTOM - TOP) / SIZE);
1017         NEW:
1018             $c = Math::Complex->make(LEFT + $x * (RIGHT - LEFT) / SIZE,
1019                                      TOP + $y * (BOTTOM - TOP) / SIZE);
1020
1021      A break at an equals is sometimes useful for preventing complex statements 
1022      from hitting the line length limit.  The decision to do this was 
1023      over-eager in some cases and has been improved.  Thanks to Royce Reece.
1024
1025      -qw quotes contained in braces, square brackets, and parens are being
1026      treated more like those containers as far as stacking of tokens.  Also
1027      stack of closing tokens ending ');' will outdent to where the ');' would
1028      have outdented if the closing stack is matched with a similar opening stack.
1029
1030       OLD: perltidy -soc -sct
1031         __PACKAGE__->load_components(
1032             qw(
1033               PK::Auto
1034               Core
1035               )
1036         );
1037       NEW: perltidy -soc -sct
1038         __PACKAGE__->load_components( qw(
1039               PK::Auto
1040               Core
1041         ) );
1042       Thanks to Aran Deltac
1043
1044      -Eliminated some undesirable or marginally desirable vertical alignments.
1045      These include terminal colons, opening braces, and equals, and particularly
1046      when just two lines would be aligned.
1047
1048      OLD:
1049         my $accurate_timestamps = $Stamps{lnk};
1050         my $has_link            = 
1051             ...
1052      NEW:
1053         my $accurate_timestamps = $Stamps{lnk};
1054         my $has_link =
1055
1056      -Corrected a problem with -mangle in which a space would be removed
1057      between a keyword and variable beginning with ::.
1058
1059   2006 06 14
1060      -Attribute argument lists are now correctly treated as quoted strings
1061      and not formatted.  This is the most important update in this version.
1062      Thanks to Borris Zentner, Greg Ferguson, Steve Kirkup.
1063
1064      -Updated to recognize the defined or operator, //, to be released in Perl 10.
1065      Thanks to Sebastien Aperghis-Tramoni.
1066
1067      -A useful utility perltidyrc_dump.pl is included in the examples section.  It
1068      will read any perltidyrc file and write it back out in a standard format
1069      (though comments are lost).
1070
1071      -Added option to have perltidy read and return a hash with the contents of a
1072      perltidyrc file.  This may be used by Leif Eriksen's tidyview code.  This
1073      feature is used by the demonstration program 'perltidyrc_dump.pl' in the
1074      examples directory.
1075
1076      -Improved error checking in perltidyrc files.  Unknown bare words were not
1077      being caught.
1078
1079      -The --dump-options parameter now dumps parameters in the format required by a
1080      perltidyrc file.
1081
1082      -V-Strings with underscores are now recognized.
1083      For example: $v = v1.2_3; 
1084
1085      -cti=3 option added which gives one extra indentation level to closing 
1086      tokens always.  This provides more predictable closing token placement
1087      than cti=2.  If you are using cti=2 you might want to try cti=3.
1088
1089      -To identify all left-adjusted comments as static block comments, use C<-sbcp='^#'>.
1090
1091      -New parameters -fs, -fsb, -fse added to allow sections of code between #<<<
1092      and #>>> to be passed through verbatim. This is enabled by default and turned
1093      off by -nfs.  Flags -fsb and -fse allow other beginning and ending markers.
1094      Thanks to Wolfgang Werner and Marion Berryman for suggesting this.  
1095
1096      -added flag -skp to put a space between all Perl keywords and following paren.
1097      The default is to only do this for certain keywords.  Suggested by
1098      H.Merijn Brand.
1099
1100      -added flag -sfp to put a space between a function name and following paren.
1101      The default is not to do this.  Suggested by H.Merijn Brand.
1102
1103      -Added patch to avoid breaking GetOpt::Long::Configure set by calling program. 
1104      Thanks to Philippe Bruhat.
1105
1106      -An error was fixed in which certain parameters in a .perltidyrc file given
1107      without the equals sign were not recognized.  That is,
1108      '--brace-tightness 0' gave an error but '--brace-tightness=0' worked
1109      ok.  Thanks to Zac Hansen.
1110
1111      -An error preventing the -nwrs flag from working was corrected. Thanks to
1112       Greg Ferguson.
1113
1114      -Corrected some alignment problems with entab option.
1115
1116      -A bug with the combination of -lp and -extrude was fixed (though this
1117      combination doesn't really make sense).  The bug was that a line with
1118      a single zero would be dropped.  Thanks to Cameron Hayne.
1119
1120      -Updated Windows detection code to avoid an undefined variable.
1121      Thanks to Joe Yates and Russ Jones.
1122
1123      -Improved formatting for short trailing statements following a closing paren.
1124      Thanks to Joe Matarazzo.
1125
1126      -The handling of the -icb (indent closing block braces) flag has been changed
1127      slightly to provide more consistent and predictable formatting of complex
1128      structures.  Instead of giving a closing block brace the indentation of the
1129      previous line, it is now given one extra indentation level.  The two methods
1130      give the same result if the previous line was a complete statement, as in this
1131      example:
1132
1133             if ($task) {
1134                 yyy();
1135                 }    # -icb
1136             else {
1137                 zzz();
1138                 }
1139      The change also fixes a problem with empty blocks such as:
1140
1141         OLD, -icb:
1142         elsif ($debug) {
1143         }
1144
1145         NEW, -icb:
1146         elsif ($debug) {
1147             }
1148
1149      -A problem with -icb was fixed in which a closing brace was misplaced when
1150      it followed a quote which spanned multiple lines.
1151
1152      -Some improved breakpoints for -wba='&& || and or'
1153
1154      -Fixed problem with misaligned cuddled else in complex statements
1155      when the -bar flag was also used.  Thanks to Alex and Royce Reese.
1156
1157      -Corrected documentation to show that --outdent-long-comments is the default.
1158      Thanks to Mario Lia.
1159
1160      -New flag -otr (opening-token-right) is similar to -bar (braces-always-right)
1161      but applies to non-structural opening tokens.
1162
1163      -new flags -sot (stack-opening-token), -sct (stack-closing-token).
1164      Suggested by Tony.
1165
1166   2003 10 21
1167      -The default has been changed to not do syntax checking with perl.  
1168        Use -syn if you want it.  Perltidy is very robust now, and the -syn
1169        flag now causes more problems than it's worth because of BEGIN blocks
1170        (which get executed with perl -c).  For example, perltidy will never
1171        return when trying to beautify this code if -syn is used:
1172
1173             BEGIN { 1 while { }; }
1174
1175       Although this is an obvious error, perltidy is often run on untested
1176       code which is more likely to have this sort of problem.  A more subtle
1177       example is:
1178
1179             BEGIN { use FindBin; }
1180
1181       which may hang on some systems using -syn if a shared file system is
1182       unavailable.
1183
1184      -Changed style -gnu to use -cti=1 instead of -cti=2 (see next item).
1185       In most cases it looks better.  To recover the previous format, use
1186       '-gnu -cti=2'
1187
1188      -Added flags -cti=n for finer control of closing token indentation.
1189        -cti = 0 no extra indentation (default; same as -nicp)
1190        -cti = 1 enough indentation so that the closing token
1191             aligns with its opening token.
1192        -cti = 2 one extra indentation level if the line has the form 
1193               );   ];   or   };     (same as -icp).
1194
1195        The new option -cti=1 works well with -lp:
1196
1197        EXAMPLES:
1198
1199         # perltidy -lp -cti=1
1200         @month_of_year = (
1201                            'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
1202                            'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
1203                          );
1204
1205         # perltidy -lp -cti=2
1206         @month_of_year = (
1207                            'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
1208                            'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
1209                            );
1210       This is backwards compatible with -icp. See revised manual for
1211       details.  Suggested by Mike Pennington.
1212   
1213      -Added flag '--preserve-line-endings' or '-ple' to cause the output
1214       line ending to be the same as in the input file, for unix, dos, 
1215       or mac line endings.  Only works under unix. Suggested by 
1216       Rainer Hochschild.
1217
1218      -Added flag '--output-line-ending=s' or '-ole=s' where s=dos or win,
1219       unix, or mac.  Only works under unix.
1220
1221      -Files with Mac line endings should now be handled properly under unix
1222       and dos without being passed through a converter.
1223
1224      -You may now include 'and', 'or', and 'xor' in the list following
1225       '--want-break-after' to get line breaks after those keywords rather than
1226       before them.  Suggested by Rainer Hochschild.
1227
1228      -Corrected problem with command line option for -vtc=n and -vt=n. The
1229       equals sign was being eaten up by the Windows shell so perltidy didn't
1230       see it.
1231
1232   2003 07 26
1233      -Corrected cause of warning message with recent versions of Perl:
1234         "Possible precedence problem on bitwise & operator at ..."
1235       Thanks to Jim Files.
1236
1237      -fixed bug with -html with '=for pod2html' sections, in which code/pod
1238      output order was incorrect.  Thanks to Tassilo von Parseval.
1239
1240      -fixed bug when the -html flag is used, in which the following error
1241      message, plus others, appear:
1242          did not see <body> in pod2html output
1243      This was caused by a change in the format of html output by pod2html
1244      VERSION 1.04 (included with perl 5.8).  Thanks to Tassilo von Parseval.
1245
1246      -Fixed bug where an __END__ statement would be mistaken for a label
1247      if it is immediately followed by a line with a leading colon. Thanks
1248      to John Bayes.
1249  
1250      -Implemented guessing logic for brace types when it is ambiguous.  This
1251      has been on the TODO list a long time.  Thanks to Boris Zentner for
1252      an example.
1253
1254      -Long options may now be negated either as '--nolong-option' 
1255      or '--no-long-option'.  Thanks to Philip Newton for the suggestion.
1256
1257      -added flag --html-entities or -hent which controls the use of
1258      Html::Entities for html formatting.  Use --nohtml-entities or -nhent to
1259      prevent the use of Html::Entities to encode special symbols.  The
1260      default is -hent.  Html::Entities when formatting perl text to escape
1261      special symbols.  This may or may not be the right thing to do,
1262      depending on browser/language combinations.  Thanks to Burak Gursoy for
1263      this suggestion.
1264
1265      -Bareword strings with leading '-', like, '-foo' now count as 1 token
1266      for horizontal tightness.  This way $a{'-foo'}, $a{foo}, and $a{-foo}
1267      are now all treated similarly.  Thus, by default, OLD: $a{ -foo } will
1268      now be NEW: $a{-foo}.  Suggested by Mark Olesen.
1269
1270      -added 2 new flags to control spaces between keywords and opening parens:
1271        -sak=s  or --space-after-keyword=s,  and
1272        -nsak=s or --nospace-after-keyword=s, where 's' is a list of keywords.
1273
1274      The new default list of keywords which get a space is:
1275
1276        "my local our and or eq ne if else elsif until unless while for foreach
1277          return switch case given when"
1278
1279      Use -sak=s and -nsak=s to add and remove keywords from this list,
1280         respectively.
1281
1282      Explanation: Stephen Hildrey noted that perltidy was being inconsistent
1283      in placing spaces between keywords and opening parens, and sent a patch
1284      to give user control over this.  The above list was selected as being
1285      a reasonable default keyword list.  Previously, perltidy
1286      had a hardwired list which also included these keywords:
1287
1288             push pop shift unshift join split die
1289
1290      but did not have 'our'.  Example: if you prefer to make perltidy behave
1291      exactly as before, you can include the following two lines in your
1292      .perltidyrc file: 
1293
1294        -sak="push pop local shift unshift join split die"
1295        -nsak="our"
1296
1297      -Corrected html error in .toc file when -frm -html is used (extra ");
1298       browsers were tolerant of it.
1299
1300      -Improved alignment of chains of binary and ?/: operators. Example:
1301       OLD:
1302         $leapyear =
1303           $year % 4     ? 0
1304           : $year % 100 ? 1
1305           : $year % 400 ? 0
1306           : 1;
1307       NEW:
1308         $leapyear =
1309             $year % 4   ? 0
1310           : $year % 100 ? 1
1311           : $year % 400 ? 0
1312           : 1;
1313
1314      -improved breakpoint choices involving '->'
1315
1316      -Corrected tokenization of things like ${#} or ${©}. For example,
1317       ${©} is valid, but ${© } is a syntax error.
1318
1319      -Corrected minor tokenization errors with indirect object notation.
1320       For example, 'new A::()' works now.
1321
1322      -Minor tokenization improvements; all perl code distributed with perl 5.8 
1323       seems to be parsed correctly except for one instance (lextest.t) 
1324       of the known bug.
1325
1326   2002 11 30
1327      -Implemented scalar attributes.  Thanks to Sean Tobin for noting this.
1328
1329      -Fixed glitch introduced in previous release where -pre option
1330      was not outputting a leading html <pre> tag.
1331
1332      -Numerous minor improvements in vertical alignment, including the following:
1333
1334      -Improved alignment of opening braces in many cases.  Needed for improved
1335      switch/case formatting, and also suggested by Mark Olesen for sort/map/grep
1336      formatting.  For example:
1337
1338       OLD:
1339         @modified =
1340           map { $_->[0] }
1341           sort { $a->[1] <=> $b->[1] }
1342           map { [ $_, -M ] } @filenames;
1343
1344       NEW:
1345         @modified =
1346           map  { $_->[0] }
1347           sort { $a->[1] <=> $b->[1] }
1348           map  { [ $_, -M ] } @filenames;
1349
1350      -Eliminated alignments across unrelated statements. Example:
1351       OLD:
1352         $borrowerinfo->configure( -state => 'disabled' );
1353         $borrowerinfo->grid( -col        => 1, -row => 0, -sticky => 'w' );
1354
1355       NEW:  
1356         $borrowerinfo->configure( -state => 'disabled' );
1357         $borrowerinfo->grid( -col => 1, -row => 0, -sticky => 'w' );
1358
1359       Thanks to Mark Olesen for suggesting this.
1360
1361      -Improved alignement of '='s in certain cases.
1362       Thanks to Norbert Gruener for sending an example.
1363
1364      -Outdent-long-comments (-olc) has been re-instated as a default, since
1365       it works much better now.  Use -nolc if you want to prevent it.
1366
1367      -Added check for 'perltidy file.pl -o file.pl', which causes file.pl
1368      to be lost. (The -b option should be used instead). Thanks to mreister
1369      for reporting this problem.
1370
1371   2002 11 06
1372      -Switch/case or given/when syntax is now recognized.  Its vertical alignment
1373      is not great yet, but it parses ok.  The words 'switch', 'case', 'given',
1374      and 'when' are now treated as keywords.  If this causes trouble with older
1375      code, we could introduce a switch to deactivate it.  Thanks to Stan Brown
1376      and Jochen Schneider for recommending this.
1377
1378      -Corrected error parsing sub attributes with call parameters.
1379      Thanks to Marc Kerr for catching this.
1380
1381      -Sub prototypes no longer need to be on the same line as sub names.  
1382
1383      -a new flag -frm or --frames will cause html output to be in a
1384      frame, with table of contents in the left panel and formatted source
1385      in the right panel.  Try 'perltidy -html -frm somemodule.pm' for example.
1386
1387      -The new default for -html formatting is to pass the pod through Pod::Html.
1388      The result is syntax colored code within your pod documents. This can be
1389      deactivated with -npod.  Thanks to those who have written to discuss this,
1390      particularly Mark Olesen and Hugh Myers.
1391
1392      -the -olc (--outdent-long-comments) option works much better.  It now outdents
1393      groups of consecutive comments together, and by just the amount needed to
1394      avoid having any one line exceeding the maximum line length.
1395
1396      -block comments are now trimmed of trailing whitespace.
1397
1398      -if a directory specified with -opath does not exist, it will be created.
1399
1400      -a table of contents to packages and subs is output when -html is used.
1401      Use -ntoc to prevent this. 
1402
1403      -fixed an unusual bug in which a 'for' statement following a 'format'
1404      statement was not correctly tokenized.  Thanks to Boris Zentner for
1405      catching this.
1406
1407      -Tidy.pm is no longer dependent on modules IO::Scalar and IO::ScalarArray.  
1408      There were some speed issues.  Suggested by Joerg Walter.
1409
1410      -The treatment of quoted wildcards (file globs) is now system-independent. 
1411      For example
1412
1413         perltidy 'b*x.p[lm]'
1414
1415      would match box.pl, box.pm, brinx.pm under any operating system.  Of
1416      course, anything unquoted will be subject to expansion by any shell.
1417
1418      -default color for keywords under -html changed from 
1419      SaddleBrown (#8B4513) to magenta4 (#8B008B).
1420
1421      -fixed an arg parsing glitch in which something like:
1422        perltidy quick-help
1423      would trigger the help message and exit, rather than operate on the
1424      file 'quick-help'.
1425
1426   2002 09 22
1427      -New option '-b' or '--backup-and-modify-in-place' will cause perltidy to
1428      overwrite the original file with the tidied output file.  The original
1429      file will be saved with a '.bak' extension (which can be changed with
1430      -bext=s).  Thanks to Rudi Farkas for the suggestion.
1431
1432      -An index to all subs is included at the top of -html output, unless
1433      only the <pre> section is written.
1434
1435      -Anchor lines of the form <a name="mysub"></a> are now inserted at key points
1436      in html output, such as before sub definitions, for the convenience of
1437      postprocessing scripts.  Suggested by Howard Owen.
1438
1439      -The cuddled-else (-ce) flag now also makes cuddled continues, like
1440      this:
1441
1442         while ( ( $pack, $file, $line ) = caller( $i++ ) ) {
1443            # bla bla
1444         } continue {
1445             $prevpack = $pack;
1446         }
1447
1448      Suggested by Simon Perreault.  
1449
1450      -Fixed bug in which an extra blank line was added before an =head or 
1451      similar pod line after an __END__ or __DATA__ line each time 
1452      perltidy was run.  Also, an extra blank was being added after
1453      a terminal =cut.  Thanks to Mike Birdsall for reporting this.
1454
1455   2002 08 26
1456      -Fixed bug in which space was inserted in a hyphenated hash key:
1457         my $val = $myhash{USER-NAME};
1458       was converted to:
1459         my $val = $myhash{USER -NAME}; 
1460       Thanks to an anonymous bug reporter at sourceforge.
1461
1462      -Fixed problem with the '-io' ('--indent-only') where all lines 
1463       were double spaced.  Thanks to Nick Andrew for reporting this bug.
1464
1465      -Fixed tokenization error in which something like '-e1' was 
1466       parsed as a number. 
1467
1468      -Corrected a rare problem involving older perl versions, in which 
1469       a line break before a bareword caused problems with 'use strict'.
1470       Thanks to Wolfgang Weisselberg for noting this.
1471
1472      -More syntax error checking added.
1473
1474      -Outdenting labels (-ola) has been made the default, in order to follow the
1475       perlstyle guidelines better.  It's probably a good idea in general, but
1476       if you do not want this, use -nola in your .perltidyrc file.
1477   
1478      -Updated rules for padding logical expressions to include more cases.
1479       Thanks to Wolfgang Weisselberg for helpful discussions.
1480
1481      -Added new flag -osbc (--outdent-static-block-comments) which will
1482       outdent static block comments by 2 spaces (or whatever -ci equals).
1483       Requested by Jon Robison.
1484
1485   2002 04 25
1486      -Corrected a bug, introduced in the previous release, in which some
1487       closing side comments (-csc) could have incorrect text.  This is
1488       annoying but will be correct the next time perltidy is run with -csc.
1489
1490      -Implemented XHTML patch submitted by Ville Skyttä.
1491
1492      -Fixed bug where whitespace was being removed between 'Bar' and '()' 
1493       in a use statement like:
1494
1495            use Foo::Bar ();
1496
1497       Thanks to Ville Skyttä for reporting this.
1498
1499      -Whenever possible, if a logical expression is broken with leading
1500       '&&', '||', 'and', or 'or', then the leading line will be padded
1501       with additional space to produce alignment.  This has been on the
1502       todo list for a long time; thanks to Frank Steinhauer for reminding
1503       me to do it.  Notice the first line after the open parens here:
1504
1505             OLD: perltidy -lp
1506             if (
1507                  !param("rules.to.$linecount")
1508                  && !param("rules.from.$linecount")
1509                  && !param("rules.subject.$linecount")
1510                  && !(
1511                        param("rules.fieldname.$linecount")
1512                        && param("rules.fieldval.$linecount")
1513                  )
1514                  && !param("rules.size.$linecount")
1515                  && !param("rules.custom.$linecount")
1516               )
1517
1518             NEW: perltidy -lp
1519             if (
1520                     !param("rules.to.$linecount")
1521                  && !param("rules.from.$linecount")
1522                  && !param("rules.subject.$linecount")
1523                  && !(
1524                           param("rules.fieldname.$linecount")
1525                        && param("rules.fieldval.$linecount")
1526                  )
1527                  && !param("rules.size.$linecount")
1528                  && !param("rules.custom.$linecount")
1529               )
1530
1531   2002 04 16
1532      -Corrected a mistokenization of variables for a package with a name
1533       equal to a perl keyword.  For example: 
1534
1535          my::qx();
1536          package my;
1537          sub qx{print "Hello from my::qx\n";}
1538
1539       In this case, the leading 'my' was mistokenized as a keyword, and a
1540       space was being place between 'my' and '::'.  This has been
1541       corrected.  Thanks to Martin Sluka for discovering this. 
1542
1543      -A new flag -bol (--break-at-old-logic-breakpoints)
1544       has been added to control whether containers with logical expressions
1545       should be broken open.  This is the default.
1546
1547      -A new flag -bok (--break-at-old-keyword-breakpoints)
1548       has been added to follow breaks at old keywords which return lists,
1549       such as sort and map.  This is the default.
1550
1551      -A new flag -bot (--break-at-old-trinary-breakpoints) has been added to
1552       follow breaks at trinary (conditional) operators.  This is the default.
1553
1554      -A new flag -cab=n has been added to control breaks at commas after
1555       '=>' tokens.  The default is n=1, meaning break unless this breaks
1556       open an existing on-line container.
1557
1558      -A new flag -boc has been added to allow existing list formatting
1559       to be retained.  (--break-at-old-comma-breakpoints).  See updated manual.
1560
1561      -A new flag -iob (--ignore-old-breakpoints) has been added to
1562       prevent the locations of old breakpoints from influencing the output
1563       format.
1564
1565      -Corrected problem where nested parentheses were not getting full
1566       indentation.  This has been on the todo list for some time; thanks 
1567       to Axel Rose for a snippet demonstrating this issue.
1568
1569                 OLD: inner list is not indented
1570                 $this->sendnumeric(
1571                     $this->server,
1572                     (
1573                       $ret->name,        $user->username, $user->host,
1574                     $user->server->name, $user->nick,     "H"
1575                     ),
1576                 );
1577
1578                 NEW:
1579                 $this->sendnumeric(
1580                     $this->server,
1581                     (
1582                         $ret->name,          $user->username, $user->host,
1583                         $user->server->name, $user->nick,     "H"
1584                     ),
1585                 );
1586
1587      -Code cleaned up by removing the following unused, undocumented flags.
1588       They should not be in any .perltidyrc files because they were just
1589       experimental flags which were never documented.  Most of them placed
1590       artificial limits on spaces, and Wolfgang Weisselberg convinced me that
1591       most of them they do more harm than good by causing unexpected results.
1592
1593       --maximum-continuation-indentation (-mci)
1594       --maximum-whitespace-columns
1595       --maximum-space-to-comment (-xsc)
1596       --big-space-jump (-bsj)
1597
1598      -Pod file 'perltidy.pod' has been appended to the script 'perltidy', and
1599       Tidy.pod has been append to the module 'Tidy.pm'.  Older MakeMaker's
1600       were having trouble.
1601  
1602      -A new flag -isbc has been added for more control on comments. This flag
1603       has the effect that if there is no leading space on the line, then the
1604       comment will not be indented, and otherwise it may be.  If both -ibc and
1605       -isbc are set, then -isbc takes priority.  Thanks to Frank Steinhauer
1606       for suggesting this.
1607
1608      -A new document 'stylekey.pod' has been created to quickly guide new users
1609       through the maze of perltidy style parameters.  An html version is 
1610       on the perltidy web page.  Take a look! It should be very helpful.
1611
1612      -Parameters for controlling 'vertical tightness' have been added:
1613       -vt and -vtc are the main controls, but finer control is provided
1614       with -pvt, -pcvt, -bvt, -bcvt, -sbvt, -sbcvt.  Block brace vertical
1615       tightness controls have also been added.
1616       See updated manual and also see 'stylekey.pod'. Simple examples:
1617
1618         # perltidy -lp -vt=1 -vtc=1
1619         @month_of_year = ( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
1620                            'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' );
1621
1622         # perltidy -lp -vt=1 -vtc=0
1623         @month_of_year = ( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
1624                            'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
1625         );
1626
1627      -Lists which do not format well in uniform columns are now better
1628       identified and formated.
1629
1630         OLD:
1631         return $c->create( 'polygon', $x, $y, $x + $ruler_info{'size'},
1632             $y + $ruler_info{'size'}, $x - $ruler_info{'size'},
1633             $y + $ruler_info{'size'} );
1634
1635         NEW:
1636         return $c->create(
1637             'polygon', $x, $y,
1638             $x + $ruler_info{'size'},
1639             $y + $ruler_info{'size'},
1640             $x - $ruler_info{'size'},
1641             $y + $ruler_info{'size'}
1642         );
1643
1644         OLD:
1645           radlablist($f1, pad('Initial', $p), $b->{Init}->get_panel_ref, 'None ',
1646                      'None', 'Default', 'Default', 'Simple', 'Simple');
1647         NEW:
1648           radlablist($f1,
1649                      pad('Initial', $p),
1650                      $b->{Init}->get_panel_ref,
1651                      'None ', 'None', 'Default', 'Default', 'Simple', 'Simple');
1652
1653      -Corrected problem where an incorrect html filename was generated for 
1654       external calls to Tidy.pm module.  Fixed incorrect html title when
1655       Tidy.pm is called with IO::Scalar or IO::Array source.
1656
1657      -Output file permissons are now set as follows.  An output script file
1658       gets the same permission as the input file, except that owner
1659       read/write permission is added (otherwise, perltidy could not be
1660       rerun).  Html output files use system defaults.  Previously chmod 0755
1661       was used in all cases.  Thanks to Mark Olesen for bringing this up.
1662
1663      -Missing semicolons will not be added in multi-line blocks of type
1664       sort, map, or grep.  This brings perltidy into closer agreement
1665       with common practice.  Of course, you can still put semicolons 
1666       there if you like.  Thanks to Simon Perreault for a discussion of this.
1667
1668      -Most instances of extra semicolons are now deleted.  This is
1669       particularly important if the -csc option is used.  Thanks to Wolfgang
1670       Weisselberg for noting this.  For example, the following line
1671       (produced by 'h2xs' :) has an extra semicolon which will now be
1672       removed:
1673
1674          BEGIN { plan tests => 1 };
1675
1676      -New parameter -csce (--closing-side-comment-else-flag) can be used
1677       to control what text is appended to 'else' and 'elsif' blocks.
1678       Default is to just add leading 'if' text to an 'else'.  See manual.
1679
1680      -The -csc option now labels 'else' blocks with additinal information
1681       from the opening if statement and elsif statements, if space.
1682       Thanks to Wolfgang Weisselberg for suggesting this.
1683
1684      -The -csc option will now remove any old closing side comments
1685       below the line interval threshold. Thanks to Wolfgang Weisselberg for
1686       suggesting this.
1687
1688      -The abbreviation feature, which was broken in the previous version,
1689       is now fixed.  Thanks to Michael Cartmell for noting this.
1690
1691      -Vertical alignment is now done for '||='  .. somehow this was 
1692       overlooked.
1693
1694   2002 02 25
1695      -This version uses modules for the first time, and a standard perl
1696       Makefile.PL has been supplied.  However, perltidy may still be
1697       installed as a single script, without modules.  See INSTALL for
1698       details.
1699
1700      -The man page 'perl2web' has been merged back into the main 'perltidy'
1701       man page to simplify installation.  So you may remove that man page
1702       if you have an older installation.
1703
1704      -Added patch from Axel Rose for MacPerl.  The patch prompts the user
1705       for command line arguments before calling the module 
1706       Perl::Tidy::perltidy.
1707
1708      -Corrected bug with '-bar' which was introduced in the previous
1709       version.  A closing block brace was being indented.  Thanks to
1710       Alexandros M Manoussakis for reporting this.
1711
1712      -New parameter '--entab-leading-whitespace=n', or '-et=n', has been
1713       added for those who prefer tabs.  This behaves different from the
1714       existing '-t' parameter; see updated man page.  Suggested by Mark
1715       Olesen.
1716
1717      -New parameter '--perl-syntax-check-flags=s'  or '-pcsf=s' can be
1718       used to change the flags passed to perltidy in a syntax check.
1719       See updated man page.  Suggested by Mark Olesen. 
1720
1721      -New parameter '--output-path=s'  or '-opath=s' will cause output
1722       files to be placed in directory s.  See updated man page.  Thanks for
1723       Mark Olesen for suggesting this.
1724
1725      -New parameter --dump-profile (or -dpro) will dump to
1726       standard output information about the search for a
1727       configuration file, the name of whatever configuration file
1728       is selected, and its contents.  This should help debugging
1729       config files, especially on different Windows systems.
1730
1731      -The -w parameter now notes possible errors of the form:
1732
1733             $comment = s/^\s*(\S+)\..*/$1/;   # trim whitespace
1734
1735      -Corrections added for a leading ':' and for leaving a leading 'tcsh'
1736       line untouched.  Mark Olesen reported that lines of this form were
1737       accepted by perl but not by perltidy:
1738
1739             : # use -*- perl -*-
1740             eval 'exec perl -wS $0 "$@"'  # shell should exec 'perl'
1741             unless 1;                     # but Perl should skip this one
1742
1743       Perl will silently swallow a leading colon on line 1 of a
1744       script, and now perltidy will do likewise.  For example,
1745       this is a valid script, provided that it is the first line,
1746       but not otherwise:
1747
1748             : print "Hello World\n";
1749   
1750       Also, perltidy will now mark a first line with leading ':' followed by
1751       '#' as type SYSTEM (just as a #!  line), not to be formatted.
1752
1753      -List formatting improved for certain lists with special
1754       initial terms, such as occur with 'printf', 'sprintf',
1755       'push', 'pack', 'join', 'chmod'.  The special initial term is
1756       now placed on a line by itself.  For example, perltidy -gnu
1757
1758          OLD:
1759             $Addr = pack(
1760                          "C4",                hex($SourceAddr[0]),
1761                          hex($SourceAddr[1]), hex($SourceAddr[2]),
1762                          hex($SourceAddr[3])
1763                          );
1764
1765          NEW:
1766             $Addr = pack("C4",
1767                          hex($SourceAddr[0]), hex($SourceAddr[1]),
1768                          hex($SourceAddr[2]), hex($SourceAddr[3]));
1769
1770           OLD:
1771                 push (
1772                       @{$$self{states}}, '64', '66', '68',
1773                       '70',              '72', '74', '76',
1774                       '78',              '80', '82', '84',
1775                       '86',              '88', '90', '92',
1776                       '94',              '96', '98', '100',
1777                       '102',             '104'
1778                       );
1779
1780           NEW:
1781                 push (
1782                       @{$$self{states}},
1783                       '64', '66', '68', '70', '72',  '74',  '76',
1784                       '78', '80', '82', '84', '86',  '88',  '90',
1785                       '92', '94', '96', '98', '100', '102', '104'
1786                       );
1787
1788      -Lists of complex items, such as matricies, are now detected
1789       and displayed with just one item per row:
1790
1791         OLD:
1792         $this->{'CURRENT'}{'gfx'}{'MatrixSkew'} = Text::PDF::API::Matrix->new(
1793             [ 1, tan( deg2rad($a) ), 0 ], [ tan( deg2rad($b) ), 1, 0 ],
1794             [ 0, 0, 1 ]
1795         );
1796
1797         NEW:
1798         $this->{'CURRENT'}{'gfx'}{'MatrixSkew'} = Text::PDF::API::Matrix->new(
1799             [ 1,                  tan( deg2rad($a) ), 0 ],
1800             [ tan( deg2rad($b) ), 1,                  0 ],
1801             [ 0,                  0,                  1 ]
1802         );
1803
1804      -The perl syntax check will be turned off for now when input is from
1805       standard input or standard output.  The reason is that this requires
1806       temporary files, which has produced far too many problems during
1807       Windows testing.  For example, the POSIX module under Windows XP/2000
1808       creates temporary names in the root directory, to which only the
1809       administrator should have permission to write.
1810
1811      -Merged patch sent by Yves Orton to handle appropriate
1812       configuration file locations for different Windows varieties
1813       (2000, NT, Me, XP, 95, 98).
1814
1815      -Added patch to properly handle a for/foreach loop without
1816       parens around a list represented as a qw.  I didn't know this
1817       was possible until Wolfgang Weisselberg pointed it out:
1818
1819             foreach my $key qw\Uno Due Tres Quadro\ {
1820                 print "Set $key\n";
1821             }
1822
1823       But Perl will give a syntax error without the $ variable; ie this will
1824       not work:
1825
1826             foreach qw\Uno Due Tres Quadro\ {
1827                 print "Set $_\n";
1828             }
1829
1830      -Merged Windows version detection code sent by Yves Orton.  Perltidy
1831       now automatically turns off syntax checking for Win 9x/ME versions,
1832       and this has solved a lot of robustness problems.  These systems 
1833       cannot reliably handle backtick operators.  See man page for
1834       details.
1835   
1836      -Merged VMS filename handling patch sent by Michael Cartmell.  (Invalid
1837       output filenames were being created in some cases). 
1838
1839      -Numerous minor improvements have been made for -lp style indentation.
1840
1841      -Long C-style 'for' expressions will be broken after each ';'.   
1842
1843       'perltidy -gnu' gives:
1844
1845         OLD:
1846         for ($status = $db->seq($key, $value, R_CURSOR()) ; $status == 0
1847              and $key eq $origkey ; $status = $db->seq($key, $value, R_NEXT())) 
1848
1849         NEW:
1850         for ($status = $db->seq($key, $value, R_CURSOR()) ;
1851              $status == 0 and $key eq $origkey ;
1852              $status = $db->seq($key, $value, R_NEXT()))
1853
1854      -For the -lp option, a single long term within parens
1855       (without commas) now has better alignment.  For example,
1856       perltidy -gnu
1857
1858                 OLD:
1859                 $self->throw("Must specify a known host, not $location,"
1860                       . " possible values ("
1861                       . join (",", sort keys %hosts) . ")");
1862
1863                 NEW:
1864                 $self->throw("Must specify a known host, not $location,"
1865                              . " possible values ("
1866                              . join (",", sort keys %hosts) . ")");
1867
1868   2001 12 31
1869      -This version is about 20 percent faster than the previous
1870       version as a result of optimization work.  The largest gain
1871       came from switching to a dispatch hash table in the
1872       tokenizer.
1873
1874      -perltidy -html will check to see if HTML::Entities is
1875       installed, and if so, it will use it to encode unsafe
1876       characters.
1877
1878      -Added flag -oext=ext to change the output file extension to
1879       be different from the default ('tdy' or 'html').  For
1880       example:
1881
1882         perltidy -html -oext=htm filename
1883
1884      will produce filename.htm
1885
1886      -Added flag -cscw to issue warnings if a closing side comment would replace
1887      an existing, different side comments.  See the man page for details.
1888      Thanks to Peter Masiar for helpful discussions.
1889
1890      -Corrected tokenization error of signed hex/octal/binary numbers. For
1891      example, the first hex number below would have been parsed correctly
1892      but the second one was not:
1893         if ( ( $tmp >= 0x80_00_00 ) || ( $tmp < -0x80_00_00 ) ) { }
1894
1895      -'**=' was incorrectly tokenized as '**' and '='.  This only
1896          caused a problem with the -extrude opton.
1897
1898      -Corrected a divide by zero when -extrude option is used
1899
1900      -The flag -w will now contain all errors reported by 'perl -c' on the
1901      input file, but otherwise they are not reported.  The reason is that
1902      perl will report lots of problems and syntax errors which are not of
1903      interest when only a small snippet is being formatted (such as missing
1904      modules and unknown bare words).  Perltidy will always report all
1905      significant syntax errors that it finds, such as unbalanced braces,
1906      unless the -q (quiet) flag is set.
1907
1908      -Merged modifications created by Hugh Myers into perltidy.
1909       These include a 'streamhandle' routine which allows perltidy
1910       as a module to operate on input and output arrays and strings
1911       in addition to files.  Documentation and new packaging as a
1912       module should be ready early next year; This is an elegant,
1913       powerful update; many thanks to Hugh for contributing it.
1914
1915   2001 11 28
1916      -added a tentative patch which tries to keep any existing breakpoints
1917      at lines with leading keywords map,sort,eval,grep. The idea is to
1918      improve formatting of sequences of list operations, as in a schwartzian
1919      transform.  Example:
1920
1921         INPUT:
1922         my @sorted = map { $_->[0] }
1923                      sort { $a->[1] <=> $b->[1] }
1924                      map { [ $_, rand ] } @list;
1925
1926         OLD:
1927         my @sorted =
1928           map { $_->[0] } sort { $a->[1] <=> $b->[1] } map { [ $_, rand ] } @list;
1929
1930         NEW:
1931         my @sorted = map { $_->[0] }
1932           sort { $a->[1] <=> $b->[1] }
1933           map { [ $_, rand ] } @list;
1934
1935       The new alignment is not as nice as the input, but this is an improvement.
1936       Thanks to Yves Orton for this suggestion.
1937
1938      -modified indentation logic so that a line with leading opening paren,
1939      brace, or square bracket will never have less indentation than the
1940      line with the corresponding opening token.  Here's a simple example:
1941
1942         OLD:
1943             $mw->Button(
1944                 -text    => "New Document",
1945                 -command => \&new_document
1946               )->pack(
1947                 -side   => 'bottom',
1948                 -anchor => 'e'
1949             );
1950
1951         Note how the closing ');' is lined up with the first line, even
1952         though it closes a paren in the 'pack' line.  That seems wrong.
1953  
1954         NEW:
1955             $mw->Button(
1956                 -text    => "New Document",
1957                 -command => \&new_document
1958               )->pack(
1959                 -side   => 'bottom',
1960                 -anchor => 'e'
1961               );
1962
1963        This seems nicer: you can up-arrow with an editor and arrive at the
1964        opening 'pack' line.
1965  
1966      -corrected minor glitch in which cuddled else (-ce) did not get applied
1967      to an 'unless' block, which should look like this:
1968
1969             unless ($test) {
1970
1971             } else {
1972
1973             }
1974
1975       Thanks to Jeremy Mates for reporting this.
1976
1977      -The man page has been reorganized to parameters easier to find.
1978  
1979      -Added check for multiple definitions of same subroutine.  It is easy
1980       to introduce this problem when cutting and pasting. Perl does not
1981       complain about it, but it can lead to disaster.
1982
1983      -The command -pro=filename  or -profile=filename may be used to specify a
1984       configuration file which will override the default name of .perltidyrc.
1985       There must not be a space on either side of the '=' sign.  I needed
1986       this to be able to easily test perltidy with a variety of different
1987       configuration files.
1988
1989      -Side comment alignment has been improved somewhat across frequent level
1990       changes, as in short if/else blocks.  Thanks to Wolfgang Weisselberg 
1991       for pointing out this problem.  For example:
1992     
1993         OLD:
1994         if ( ref $self ) {    # Called as a method
1995             $format = shift;
1996         }
1997         else {    # Regular procedure call
1998             $format = $self;
1999             undef $self;
2000         }
2001
2002         NEW:
2003         if ( ref $self ) {    # Called as a method
2004             $format = shift;
2005         }
2006         else {                # Regular procedure call
2007             $format = $self;
2008             undef $self;
2009         }
2010
2011      -New command -ssc (--static-side-comment) and related command allows
2012       side comments to be spaced close to preceding character.  This is
2013       useful for displaying commented code as side comments.
2014
2015      -New command -csc (--closing-side-comment) and several related
2016       commands allow comments to be added to (and deleted from) any or all
2017       closing block braces.  This can be useful if you have to maintain large
2018       programs, especially those that you didn't write.  See updated man page.
2019       Thanks to Peter Masiar for this suggestion.  For a simple example:
2020
2021             perltidy -csc
2022
2023             sub foo {
2024                 if ( !defined( $_[0] ) ) {
2025                     print("Hello, World\n");
2026                 }
2027                 else {
2028                     print( $_[0], "\n" );
2029                 }
2030             } ## end sub foo
2031
2032       This added '## end sub foo' to the closing brace.  
2033       To remove it, perltidy -ncsc.
2034
2035      -New commands -ola, for outdenting labels, and -okw, for outdenting
2036       selected control keywords, were implemented.  See the perltidy man
2037       page for details.  Thanks to Peter Masiar for this suggestion.
2038
2039      -Hanging side comment change: a comment will not be considered to be a
2040       hanging side comment if there is no leading whitespace on the line.
2041       This should improve the reliability of identifying hanging side comments.
2042       Thanks to Peter Masiar for this suggestion.
2043
2044      -Two new commands for outdenting, -olq (outdent-long-quotes) and -olc
2045       (outdent-long-comments), have been added.  The original -oll
2046       (outdent-long-lines) remains, and now is an abbreviation for -olq and -olc.
2047       The new default is just -olq.  This was necessary to avoid inconsistency with
2048       the new static block comment option.
2049
2050      -Static block comments:  to provide a way to display commented code
2051       better, the convention is used that comments with a leading '##' should
2052       not be formatted as usual.  Please see '-sbc' (or '--static-block-comment')
2053       for documentation.  It can be deactivated with with -nsbc, but
2054       should not normally be necessary. Thanks to Peter Masiar for this 
2055       suggestion.
2056
2057      -Two changes were made to help show structure of complex lists:
2058       (1) breakpoints are forced after every ',' in a list where any of
2059       the list items spans multiple lines, and
2060       (2) List items which span multiple lines now get continuation indentation.
2061
2062       The following example illustrates both of these points.  Many thanks to
2063       Wolfgang Weisselberg for this snippet and a discussion of it; this is a
2064       significant formatting improvement. Note how it is easier to see the call
2065       parameters in the NEW version:
2066
2067         OLD:
2068         assert( __LINE__, ( not defined $check )
2069             or ref $check
2070             or $check eq "new"
2071             or $check eq "old", "Error in parameters",
2072             defined $old_new ? ( ref $old_new ? ref $old_new : $old_new ) : "undef",
2073             defined $db_new  ? ( ref $db_new  ? ref $db_new  : $db_new )  : "undef",
2074             defined $old_db ? ( ref $old_db ? ref $old_db : $old_db ) : "undef" );
2075
2076         NEW: 
2077         assert(
2078             __LINE__,
2079             ( not defined $check )
2080               or ref $check
2081               or $check eq "new"
2082               or $check eq "old",
2083             "Error in parameters",
2084             defined $old_new ? ( ref $old_new ? ref $old_new : $old_new ) : "undef",
2085             defined $db_new  ? ( ref $db_new  ? ref $db_new  : $db_new )  : "undef",
2086             defined $old_db  ? ( ref $old_db  ? ref $old_db  : $old_db )  : "undef"
2087         );
2088
2089         Another example shows how this helps displaying lists:
2090
2091         OLD:
2092         %{ $self->{COMPONENTS} } = (
2093             fname =>
2094             { type => 'name', adj => 'yes', font => 'Helvetica', 'index' => 0 },
2095             street =>
2096             { type => 'road', adj => 'yes', font => 'Helvetica', 'index' => 2 },
2097         );
2098
2099         The structure is clearer with the added indentation:
2100     
2101         NEW:
2102         %{ $self->{COMPONENTS} } = (
2103             fname =>
2104               { type => 'name', adj => 'yes', font => 'Helvetica', 'index' => 0 },
2105             street =>
2106               { type => 'road', adj => 'yes', font => 'Helvetica', 'index' => 2 },
2107         );
2108
2109         -The structure of nested logical expressions is now displayed better.
2110         Thanks to Wolfgang Weisselberg for helpful discussions.  For example,
2111         note how the status of the final 'or' is displayed in the following:
2112
2113         OLD:
2114         return ( !null($op)
2115               and null( $op->sibling )
2116               and $op->ppaddr eq "pp_null"
2117               and class($op) eq "UNOP"
2118               and ( ( $op->first->ppaddr =~ /^pp_(and|or)$/
2119                 and $op->first->first->sibling->ppaddr eq "pp_lineseq" )
2120                 or ( $op->first->ppaddr eq "pp_lineseq"
2121                     and not null $op->first->first->sibling
2122                     and $op->first->first->sibling->ppaddr eq "pp_unstack" ) ) );
2123
2124         NEW:
2125         return (
2126             !null($op)
2127               and null( $op->sibling )
2128               and $op->ppaddr eq "pp_null"
2129               and class($op) eq "UNOP"
2130               and (
2131                 (
2132                     $op->first->ppaddr =~ /^pp_(and|or)$/
2133                     and $op->first->first->sibling->ppaddr eq "pp_lineseq"
2134                 )
2135                 or ( $op->first->ppaddr eq "pp_lineseq"
2136                     and not null $op->first->first->sibling
2137                     and $op->first->first->sibling->ppaddr eq "pp_unstack" )
2138               )
2139         );
2140
2141        -A break will always be put before a list item containing a comma-arrow.
2142        This will improve formatting of mixed lists of this form:
2143
2144             OLD:
2145             $c->create(
2146                 'text', 225, 20, -text => 'A Simple Plot',
2147                 -font => $font,
2148                 -fill => 'brown'
2149             );
2150
2151             NEW:
2152             $c->create(
2153                 'text', 225, 20,
2154                 -text => 'A Simple Plot',
2155                 -font => $font,
2156                 -fill => 'brown'
2157             );
2158
2159       -For convenience, the command -dac (--delete-all-comments) now also
2160       deletes pod.  Likewise, -tac (--tee-all-comments) now also sends pod
2161       to a '.TEE' file.  Complete control over the treatment of pod and
2162       comments is still possible, as described in the updated help message 
2163       and man page.
2164
2165       -The logic which breaks open 'containers' has been rewritten to be completely
2166       symmetric in the following sense: if a line break is placed after an opening
2167       {, [, or (, then a break will be placed before the corresponding closing
2168       token.  Thus, a container either remains closed or is completely cracked
2169       open.
2170
2171       -Improved indentation of parenthesized lists.  For example, 
2172
2173                 OLD:
2174                 $GPSCompCourse =
2175                   int(
2176                   atan2( $GPSTempCompLong - $GPSLongitude,
2177                   $GPSLatitude - $GPSTempCompLat ) * 180 / 3.14159265 );
2178
2179                 NEW:
2180                 $GPSCompCourse = int(
2181                     atan2(
2182                         $GPSTempCompLong - $GPSLongitude,
2183                         $GPSLatitude - $GPSTempCompLat
2184                       ) * 180 / 3.14159265
2185                 );
2186
2187        Further improvements will be made in future releases.
2188
2189       -Some improvements were made in formatting small lists.
2190
2191       -Correspondence between Input and Output line numbers reported in a 
2192        .LOG file should now be exact.  They were sometimes off due to the size
2193        of intermediate buffers.
2194
2195       -Corrected minor tokenization error in which a ';' in a foreach loop
2196        control was tokenized as a statement termination, which forced a 
2197        line break:
2198
2199             OLD:
2200             foreach ( $i = 0;
2201                 $i <= 10;
2202                 $i += 2
2203               )
2204             {
2205                 print "$i ";
2206             }
2207
2208             NEW:
2209             foreach ( $i = 0 ; $i <= 10 ; $i += 2 ) {
2210                 print "$i ";
2211             }
2212
2213       -Corrected a problem with reading config files, in which quote marks were not
2214        stripped.  As a result, something like -wba="&& . || " would have the leading
2215        quote attached to the && and not work correctly.  A workaround for older
2216        versions is to place a space around all tokens within the quotes, like this:
2217        -wba=" && . || "
2218
2219       -Removed any existing space between a label and its ':'
2220         OLD    : { }
2221         NEW: { }
2222        This was necessary because the label and its colon are a single token.
2223
2224       -Corrected tokenization error for the following (highly non-recommended) 
2225        construct:
2226         $user = @vars[1] / 100;
2227  
2228       -Resolved cause of a difference between perltidy under perl v5.6.1 and
2229       5.005_03; the problem was different behavior of \G regex position
2230       marker(!)
2231
2232   2001 10 20
2233      -Corrected a bug in which a break was not being made after a full-line
2234      comment within a short eval/sort/map/grep block.  A flag was not being
2235      zeroed.  The syntax error check catches this.  Here is a snippet which
2236      illustrates the bug:
2237
2238             eval {
2239                 #open Socket to Dispatcher
2240                 $sock = &OpenSocket;
2241             };
2242
2243      The formatter mistakenly thought that it had found the following 
2244      one-line block:
2245  
2246             eval {#open Socket to Dispatcher$sock = &OpenSocket; };
2247
2248      The patch fixes this. Many thanks to Henry Story for reporting this bug.
2249
2250      -Changes were made to help diagnose and resolve problems in a
2251      .perltidyrc file: 
2252        (1) processing of command parameters has been into two separate
2253        batches so that any errors in a .perltidyrc file can be localized.  
2254        (2) commands --help, --version, and as many of the --dump-xxx
2255        commands are handled immediately, without any command line processing
2256        at all.  
2257        (3) Perltidy will ignore any commands in the .perltidyrc file which
2258        cause immediate exit.  These are:  -h -v -ddf -dln -dop -dsn -dtt
2259        -dwls -dwrs -ss.  Thanks to Wolfgang Weisselberg for helpful
2260        suggestions regarding these updates.
2261
2262      -Syntax check has been reinstated as default for MSWin32 systems.  This
2263      way Windows 2000 users will get syntax check by default, which seems
2264      like a better idea, since the number of Win 95/98 systems will be
2265      decreasing over time.  Documentation revised to warn Windows 95/98
2266      users about the problem with empty '&1'.  Too bad these systems
2267      all report themselves as MSWin32.
2268
2269   2001 10 16
2270      -Fixed tokenization error in which a method call of the form
2271
2272         Module::->new();
2273  
2274       got a space before the '::' like this:
2275
2276         Module ::->new();
2277
2278       Thanks to David Holden for reporting this.
2279  
2280      -Added -html control over pod text, using a new abbreviation 'pd'.  See
2281      updated perl2web man page. The default is to use the color of a comment,
2282      but italicized.  Old .css style sheets will need a new line for
2283      .pd to use this.  The old color was the color of a string, and there
2284      was no control.  
2285  
2286      -.css lines are now printed in sorted order.
2287
2288      -Fixed interpolation problem where html files had '$input_file' as title
2289      instead of actual input file name.  Thanks to Simon Perreault for finding
2290      this and sending a patch, and also to Tobias Weber.
2291
2292      -Breaks will now have the ':' placed at the start of a line, 
2293      one per line by default because this shows logical structure
2294      more clearly. This coding has been completely redone. Some 
2295      examples of new ?/: formatting:
2296
2297            OLD:
2298                 wantarray ? map( $dir::cwd->lookup($_)->path, @_ ) :
2299                   $dir::cwd->lookup( $_[0] )->path;
2300
2301            NEW:
2302                 wantarray 
2303                   ? map( $dir::cwd->lookup($_)->path, @_ )
2304                   : $dir::cwd->lookup( $_[0] )->path;
2305
2306            OLD:
2307                     $a = ( $b > 0 ) ? {
2308                         a => 1,
2309                         b => 2
2310                     } : { a => 6, b => 8 };
2311
2312            NEW:
2313                     $a = ( $b > 0 )
2314                       ? {
2315                         a => 1,
2316                         b => 2
2317                       }
2318                       : { a => 6, b => 8 };
2319
2320         OLD: (-gnu):
2321         $self->note($self->{skip} ? "Hunk #$self->{hunk} ignored at 1.\n" :
2322                     "Hunk #$self->{hunk} failed--$@");
2323
2324         NEW: (-gnu):
2325         $self->note($self->{skip} 
2326                     ? "Hunk #$self->{hunk} ignored at 1.\n"
2327                     : "Hunk #$self->{hunk} failed--$@");
2328
2329         OLD:
2330             $which_search =
2331               $opts{"t"} ? 'title'   :
2332               $opts{"s"} ? 'subject' : $opts{"a"} ? 'author' : 'title';
2333
2334         NEW:
2335             $which_search =
2336               $opts{"t"} ? 'title'
2337               : $opts{"s"} ? 'subject'
2338               : $opts{"a"} ? 'author'
2339               : 'title';
2340  
2341      You can use -wba=':' to recover the previous default which placed ':'
2342      at the end of a line.  Thanks to Michael Cartmell for helpful
2343      discussions and examples.  
2344
2345      -Tokenizer updated to do syntax checking for matched ?/: pairs.  Also,
2346      the tokenizer now outputs a unique serial number for every balanced
2347      pair of brace types and ?/: pairs.  This greatly simplifies the
2348      formatter.
2349
2350      -Long lines with repeated 'and', 'or', '&&', '||'  will now have
2351      one such item per line.  For example:
2352
2353         OLD:
2354             if ( $opt_d || $opt_m || $opt_p || $opt_t || $opt_x
2355                 || ( -e $archive && $opt_r ) )
2356             {
2357                 ( $pAr, $pNames ) = readAr($archive);
2358             }
2359
2360         NEW:
2361             if ( $opt_d
2362                 || $opt_m
2363                 || $opt_p
2364                 || $opt_t
2365                 || $opt_x
2366                 || ( -e $archive && $opt_r ) )
2367             {
2368                 ( $pAr, $pNames ) = readAr($archive);
2369             }
2370
2371        OLD:
2372             if ( $vp->{X0} + 4 <= $x && $vp->{X0} + $vp->{W} - 4 >= $x
2373                 && $vp->{Y0} + 4 <= $y && $vp->{Y0} + $vp->{H} - 4 >= $y ) 
2374
2375        NEW:
2376             if ( $vp->{X0} + 4 <= $x
2377                 && $vp->{X0} + $vp->{W} - 4 >= $x
2378                 && $vp->{Y0} + 4 <= $y
2379                 && $vp->{Y0} + $vp->{H} - 4 >= $y )
2380
2381      -Long lines with multiple concatenated tokens will have concatenated
2382      terms (see below) placed one per line, except for short items.  For
2383      example:
2384
2385        OLD:
2386             $report .=
2387               "Device type:" . $ib->family . "  ID:" . $ib->serial . "  CRC:"
2388               . $ib->crc . ": " . $ib->model() . "\n";
2389
2390        NEW:
2391             $report .= "Device type:"
2392               . $ib->family . "  ID:"
2393               . $ib->serial . "  CRC:"
2394               . $ib->model()
2395               . $ib->crc . ": " . "\n";
2396
2397      NOTE: at present 'short' means 8 characters or less.  There is a
2398      tentative flag to change this (-scl), but it is undocumented and
2399      is likely to be changed or removed later, so only use it for testing.  
2400      In the above example, the tokens "  ID:", "  CRC:", and "\n" are below
2401      this limit.  
2402
2403      -If a line which is short enough to fit on a single line was
2404      nevertheless broken in the input file at a 'good' location (see below), 
2405      perltidy will try to retain a break.  For example, the following line
2406      will be formatted as:
2407  
2408         open SUM, "<$file"
2409           or die "Cannot open $file ($!)";
2410  
2411      if it was broken in the input file, and like this if not:
2412
2413         open SUM, "<$file" or die "Cannot open $file ($!)";
2414
2415      GOOD: 'good' location means before 'and','or','if','unless','&&','||'
2416
2417      The reason perltidy does not just always break at these points is that if
2418      there are multiple, similar statements, this would preclude alignment.  So
2419      rather than check for this, perltidy just tries to follow the input style,
2420      in the hopes that the author made a good choice. Here is an example where 
2421      we might not want to break before each 'if':
2422
2423         ($Locale, @Locale) = ($English, @English) if (@English > @Locale);
2424         ($Locale, @Locale) = ($German,  @German)  if (@German > @Locale);
2425         ($Locale, @Locale) = ($French,  @French)  if (@French > @Locale);
2426         ($Locale, @Locale) = ($Spanish, @Spanish) if (@Spanish > @Locale);
2427
2428      -Added wildcard file expansion for systems with shells which lack this.
2429      Now 'perltidy *.pl' should work under MSDOS/Windows.  Thanks to Hugh Myers 
2430      for suggesting this.  This uses builtin glob() for now; I may change that.
2431
2432      -Added new flag -sbl which, if specified, overrides the value of -bl
2433      for opening sub braces.  This allows formatting of this type:
2434
2435      perltidy -sbl 
2436
2437      sub foo
2438      {
2439         if (!defined($_[0])) {
2440             print("Hello, World\n");
2441         }
2442         else {
2443             print($_[0], "\n");
2444         }
2445      }
2446      Requested by Don Alexander.
2447
2448      -Fixed minor parsing error which prevented a space after a $$ variable
2449      (pid) in some cases.  Thanks to Michael Cartmell for noting this.
2450      For example, 
2451        old: $$< 700 
2452        new: $$ < 700
2453
2454      -Improved line break choices 'and' and 'or' to display logic better.
2455      For example:
2456
2457         OLD:
2458             exists $self->{'build_dir'} and push @e,
2459               "Unwrapped into directory $self->{'build_dir'}";
2460
2461         NEW:
2462             exists $self->{'build_dir'}
2463               and push @e, "Unwrapped into directory $self->{'build_dir'}";
2464
2465      -Fixed error of multiple use of abbreviatioin '-dsc'.  -dsc remains 
2466      abbreviation for delete-side-comments; -dsm is new abbreviation for 
2467      delete-semicolons.
2468
2469      -Corrected and updated 'usage' help routine.  Thanks to Slaven Rezic for 
2470      noting an error.
2471
2472      -The default for Windows is, for now, not to do a 'perl -c' syntax
2473      check (but -syn will activate it).  This is because of problems with
2474      command.com.  James Freeman sent me a patch which tries to get around
2475      the problems, and it works in many cases, but testing revealed several
2476      issues that still need to be resolved.  So for now, the default is no
2477      syntax check for Windows.
2478
2479      -I added a -T flag when doing perl -c syntax check.
2480      This is because I test it on a large number of scripts from sources
2481      unknown, and who knows what might be hidden in initialization blocks?
2482      Also, deactivated the syntax check if perltidy is run as root.  As a
2483      benign example, running the previous version of perltidy on the
2484      following file would cause it to disappear:
2485
2486             BEGIN{
2487                     print "Bye, bye baby!\n";
2488                     unlink $0;
2489             }
2490         
2491      The new version will not let that happen.
2492
2493      -I am contemplating (but have not yet implemented) making '-lp' the
2494      default indentation, because it is stable now and may be closer to how
2495      perl is commonly formatted.  This could be in the next release.  The
2496      reason that '-lp' was not the original default is that the coding for
2497      it was complex and not ready for the initial release of perltidy.  If
2498      anyone has any strong feelings about this, I'd like to hear.  The
2499      current default could always be recovered with the '-nlp' flag.
2500
2501   2001 09 03
2502      -html updates:
2503          - sub definition names are now specially colored, red by default.  
2504            The letter 'm' is used to identify them.
2505          - keyword 'sub' now has color of other keywords.
2506          - restored html keyword color to __END__ and __DATA__, which was 
2507            accidentally removed in the previous version.
2508
2509      -A new -se (--standard-error-output) flag has been implemented and
2510      documented which causes all errors to be written to standard output
2511      instead of a .ERR file.
2512
2513      -A new -w (--warning-output) flag has been implemented and documented
2514       which causes perltidy to output certain non-critical messages to the
2515       error output file, .ERR.  These include complaints about pod usage,
2516       for example.  The default is to not include these.
2517
2518       NOTE: This replaces an undocumented -w=0 or --warning-level flag
2519       which was tentatively introduced in the previous version to avoid some
2520       unwanted messages.  The new default is the same as the old -w=0, so
2521       that is no longer needed. 
2522
2523       -Improved syntax checking and corrected tokenization of functions such
2524       as rand, srand, sqrt, ...  These can accept either an operator or a term
2525       to their right.  This has been corrected.
2526  
2527      -Corrected tokenization of semicolon: testing of the previous update showed 
2528      that the semicolon in the following statement was being mis-tokenized.  That
2529      did no harm, other than adding an extra blank space, but has been corrected.
2530
2531               for (sort {strcoll($a,$b);} keys %investments) {
2532                  ...
2533               }
2534
2535      -New syntax check: after wasting 5 minutes trying to resolve a syntax
2536       error in which I had an extra terminal ';' in a complex for (;;) statement, 
2537       I spent a few more minutes adding a check for this in perltidy so it won't
2538       happen again.
2539
2540      -The behavior of --break-before-subs (-bbs) and --break-before-blocks
2541      (-bbb) has been modified.  Also, a new control parameter,
2542      --long-block-line-count=n (-lbl=n) has been introduced to give more
2543      control on -bbb.  This was previously a hardwired value.  The reason
2544      for the change is to reduce the number of unwanted blank lines that
2545      perltidy introduces, and make it less erratic.  It's annoying to remove
2546      an unwanted blank line and have perltidy put it back.  The goal is to
2547      be able to sprinkle a few blank lines in that dense script you
2548      inherited from Bubba.  I did a lot of experimenting with different
2549      schemes for introducing blank lines before and after code blocks, and
2550      decided that there is no really good way to do it.  But I think the new
2551      scheme is an improvement.  You can always deactivate this with -nbbb.
2552      I've been meaning to work on this; thanks to Erik Thaysen for bringing
2553      it to my attention.
2554
2555      -The .LOG file is seldom needed, and I get tired of deleting them, so
2556       they will now only be automatically saved if perltidy thinks that it
2557       made an error, which is almost never.  You can still force the logfile
2558       to be saved with -log or -g.
2559
2560      -Improved method for computing number of columns in a table.  The old
2561      method always tried for an even number.  The new method allows odd
2562      numbers when it is obvious that a list is not a hash initialization
2563      list.
2564
2565        old: my (
2566                  $name,       $xsargs, $parobjs, $optypes,
2567                  $hasp2child, $pmcode, $hdrcode, $inplacecode,
2568                  $globalnew,  $callcopy
2569               )
2570               = @_;
2571
2572        new: my (
2573                  $name,   $xsargs,  $parobjs,     $optypes,   $hasp2child,
2574                  $pmcode, $hdrcode, $inplacecode, $globalnew, $callcopy
2575               )
2576               = @_;
2577
2578      -I fiddled with the list threshold adjustment, and some small lists
2579      look better now.  Here is the change for one of the lists in test file
2580      'sparse.t':
2581      old:
2582        %units =
2583          ("in", "in", "pt", "pt", "pc", "pi", "mm", "mm", "cm", "cm", "\\hsize", "%",
2584            "\\vsize", "%", "\\textwidth", "%", "\\textheight", "%");
2585
2586      new:
2587        %units = (
2588                   "in",      "in", "pt",          "pt", "pc",           "pi",
2589                   "mm",      "mm", "cm",          "cm", "\\hsize",      "%",
2590                   "\\vsize", "%",  "\\textwidth", "%",  "\\textheight", "%"
2591                   );
2592
2593      -Improved -lp formatting at '=' sign.  A break was always being added after
2594      the '=' sign in a statement such as this, (to be sure there was enough room
2595      for the parameters):
2596
2597      old: my $fee =
2598             CalcReserveFee(
2599                             $env,          $borrnum,
2600                             $biblionumber, $constraint,
2601                             $bibitems
2602                             );
2603  
2604      The updated version doesn't do this unless the space is really needed:
2605
2606      new: my $fee = CalcReserveFee(
2607                                    $env,          $borrnum,
2608                                    $biblionumber, $constraint,
2609                                    $bibitems
2610                                    );
2611
2612      -I updated the tokenizer to allow $#+ and $#-, which seem to be new to
2613      Perl 5.6.  Some experimenting with a recent version of Perl indicated
2614      that it allows these non-alphanumeric '$#' array maximum index
2615      varaibles: $#: $#- $#+ so I updated the parser accordingly.  Only $#:
2616      seems to be valid in older versions of Perl.
2617
2618      -Fixed a rare formatting problem with -lp (and -gnu) which caused
2619      excessive indentation.
2620
2621      -Many additional syntax checks have been added.
2622
2623      -Revised method for testing here-doc target strings; the following
2624      was causing trouble with a regex test because of the '*' characters:
2625       print <<"*EOF*";
2626       bla bla
2627       *EOF*
2628      Perl seems to allow almost anything to be a here doc target, so an
2629      exact string comparison is now used.
2630
2631      -Made update to allow underscores in binary numbers, like '0b1100_0000'.
2632
2633      -Corrected problem with scanning certain module names; a blank space was 
2634      being inserted after 'warnings' in the following:
2635         use warnings::register;
2636      The problem was that warnings (and a couple of other key modules) were 
2637      being tokenized as keywords.  They should have just been identifiers.
2638
2639      -Corrected tokenization of indirect objects after sort, system, and exec,
2640      after testing produced an incorrect error message for the following
2641      line of code:
2642         print sort $sortsubref @list;
2643
2644      -Corrected minor problem where a line after a format had unwanted
2645      extra continuation indentation.  
2646
2647      -Delete-block-comments (and -dac) now retain any leading hash-bang line
2648
2649      -Update for -lp (and -gnu) to not align the leading '=' of a list
2650      with a previous '=', since this interferes with alignment of parameters.
2651
2652       old:  my $hireDay = new Date;
2653             my $self    = {
2654                          firstName => undef,
2655                          lastName  => undef,
2656                          hireDay   => $hireDay
2657                          };
2658     
2659       new:  my $hireDay = new Date;
2660             my $self = {
2661                          firstName => undef,
2662                          lastName  => undef,
2663                          hireDay   => $hireDay
2664                          };
2665
2666      -Modifications made to display tables more compactly when possible,
2667       without adding lines. For example,
2668       old:
2669                     '1', "I", '2', "II", '3', "III", '4', "IV",
2670                     '5', "V", '6', "VI", '7', "VII", '8', "VIII",
2671                     '9', "IX"
2672       new:
2673                     '1', "I",   '2', "II",   '3', "III",
2674                     '4', "IV",  '5', "V",    '6', "VI",
2675                     '7', "VII", '8', "VIII", '9', "IX"
2676
2677      -Corrected minor bug in which -pt=2 did not keep the right paren tight
2678      around a '++' or '--' token, like this:
2679
2680                 for ($i = 0 ; $i < length $key ; $i++ )
2681
2682      The formatting for this should be, and now is: 
2683
2684                 for ($i = 0 ; $i < length $key ; $i++)
2685
2686      Thanks to Erik Thaysen for noting this.
2687
2688      -Discovered a new bug involving here-docs during testing!  See BUGS.html.  
2689
2690      -Finally fixed parsing of subroutine attributes (A Perl 5.6 feature).
2691      However, the attributes and prototypes must still be on the same line
2692      as the sub name.
2693
2694   2001 07 31
2695      -Corrected minor, uncommon bug found during routine testing, in which a
2696      blank got inserted between a function name and its opening paren after
2697      a file test operator, but only in the case that the function had not
2698      been previously seen.  Perl uses the existence (or lack thereof) of 
2699      the blank to guess if it is a function call.  That is,
2700         if (-l pid_filename()) {
2701      became
2702         if (-l pid_filename ()) {
2703      which is a syntax error if pid_filename has not been seen by perl.
2704
2705      -If the AutoLoader module is used, perltidy will continue formatting
2706      code after seeing an __END__ line.  Use -nlal to deactivate this feature.  
2707      Likewise, if the SelfLoader module is used, perltidy will continue 
2708      formatting code after seeing a __DATA__ line.  Use -nlsl to
2709      deactivate this feature.  Thanks to Slaven Rezic for this suggestion.
2710
2711      -pod text after __END__ and __DATA__ is now identified by perltidy
2712      so that -dp works correctly.  Thanks to Slaven Rezic for this suggestion.
2713
2714      -The first $VERSION line which might be eval'd by MakeMaker
2715      is now passed through unchanged.  Use -npvl to deactivate this feature.
2716      Thanks to Manfred Winter for this suggestion.
2717
2718      -Improved indentation of nested parenthesized expressions.  Tests have
2719      given favorable results.  Thanks to Wolfgang Weisselberg for helpful
2720      examples.
2721
2722   2001 07 23
2723      -Fixed a very rare problem in which an unwanted semicolon was inserted
2724      due to misidentification of anonymous hash reference curly as a code
2725      block curly.  (No instances of this have been reported; I discovered it
2726      during testing).  A workaround for older versions of perltidy is to use
2727      -nasc.
2728
2729      -Added -icb (-indent-closing-brace) parameter to indent a brace which
2730      terminates a code block to the same level as the previous line.
2731      Suggested by Andrew Cutler.  For example, 
2732
2733             if ($task) {
2734                 yyy();
2735                 }    # -icb
2736             else {
2737                 zzz();
2738                 }
2739
2740      -Rewrote error message triggered by an unknown bareword in a print or
2741      printf filehandle position, and added flag -w=0 to prevent issuing this
2742      error message.  Suggested by Byron Jones.
2743
2744      -Added modification to align a one-line 'if' block with similar
2745      following 'elsif' one-line blocks, like this:
2746           if    ( $something eq "simple" )  { &handle_simple }
2747           elsif ( $something eq "hard" )    { &handle_hard }
2748      (Suggested by  Wolfgang Weisselberg).
2749
2750   2001 07 02
2751      -Eliminated all constants with leading underscores because perl 5.005_03
2752      does not support that.  For example, _SPACES changed to XX_SPACES.
2753      Thanks to kromJx for this update.
2754
2755   2001 07 01
2756      -the directory of test files has been moved to a separate distribution
2757      file because it is getting large but is of little interest to most users.
2758      For the current distribution:
2759        perltidy-20010701.tgz        contains the source and docs for perltidy
2760        perltidy-20010701-test.tgz   contains the test files
2761
2762      -fixed bug where temporary file perltidy.TMPI was not being deleted 
2763      when input was from stdin.
2764
2765      -adjusted line break logic to not break after closing brace of an
2766      eval block (suggested by Boris Zentner).
2767
2768      -added flag -gnu (--gnu-style) to give an approximation to the GNU
2769      style as sometimes applied to perl.  The programming style in GNU
2770      'automake' was used as a guide in setting the parameters; these
2771      parameters will probably be adjusted over time.
2772
2773      -an empty code block now has one space for emphasis:
2774        if ( $cmd eq "bg_untested" ) {}    # old
2775        if ( $cmd eq "bg_untested" ) { }   # new
2776      If this bothers anyone, we could create a parameter.
2777
2778      -the -bt (--brace-tightness) parameter has been split into two
2779      parameters to give more control. -bt now applies only to non-BLOCK
2780      braces, while a new parameter -bbt (block-brace-tightness) applies to
2781      curly braces which contain code BLOCKS. The default value is -bbt=0.
2782
2783      -added flag -icp (--indent-closing-paren) which leaves a statement
2784      termination of the form );, };, or ]; indented with the same
2785      indentation as the previous line.  For example,
2786
2787         @month_of_year = (          # default, or -nicp
2788             'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct',
2789             'Nov', 'Dec'
2790         );
2791
2792         @month_of_year = (          # -icp
2793             'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct',
2794             'Nov', 'Dec'
2795             );
2796
2797      -Vertical alignment updated to synchronize with tokens &&, ||,
2798      and, or, if, unless.  Allowable space before forcing
2799      resynchronization has been increased.  (Suggested by  Wolfgang
2800      Weisselberg).
2801
2802      -html corrected to use -nohtml-bold-xxxxxxx or -nhbx to negate bold,
2803      and likewise -nohtml-italic-xxxxxxx or -nhbi to negate italic.  There
2804      was no way to negate these previously.  html documentation updated and
2805      corrected.  (Suggested by  Wolfgang Weisselberg).
2806
2807      -Some modifications have been made which improve the -lp formatting in
2808      a few cases.
2809
2810      -Perltidy now retains or creates a blank line after an =cut to keep
2811      podchecker happy (Suggested by Manfred H. Winter).  This appears to be
2812      a glitch in podchecker, but it was annoying.
2813
2814   2001 06 17
2815      -Added -bli flag to give continuation indentation to braces, like this
2816
2817             if ($bli_flag)
2818               {
2819                 extra_indentation();
2820               }
2821
2822      -Corrected an error with the tab (-t) option which caused the last line
2823      of a multi-line quote to receive a leading tab.  This error was in
2824      version 2001 06 08  but not 2001 04 06.  If you formatted a script
2825      with -t with this version, please check it by running once with the
2826      -chk flag and perltidy will scan for this possible error.
2827
2828      -Corrected an invalid pattern (\R should have been just R), changed
2829      $^W =1 to BEGIN {$^W=1} to use warnings in compile phase, and corrected
2830      several unnecessary 'my' declarations. Many thanks to Wolfgang Weisselberg,
2831      2001-06-12, for catching these errors.
2832  
2833      -A '-bar' flag has been added to require braces to always be on the
2834      right, even for multi-line if and foreach statements.  For example,
2835      the default formatting of a long if statement would be:
2836
2837             if ($bigwasteofspace1 && $bigwasteofspace2
2838               || $bigwasteofspace3 && $bigwasteofspace4)
2839             {
2840                 bigwastoftime();
2841             }
2842
2843      With -bar, the formatting is:
2844
2845             if ($bigwasteofspace1 && $bigwasteofspace2
2846               || $bigwasteofspace3 && $bigwasteofspace4) {
2847                 bigwastoftime();
2848             }
2849      Suggested by Eli Fidler 2001-06-11.
2850
2851      -Uploaded perltidy to sourceforge cvs 2001-06-10.
2852
2853      -An '-lp' flag (--line-up-parentheses) has been added which causes lists
2854      to be indented with extra indentation in the manner sometimes
2855      associated with emacs or the GNU suggestions.  Thanks to Ian Stuart for
2856      this suggestion and for extensive help in testing it. 
2857
2858      -Subroutine call parameter lists are now formatted as other lists.
2859      This should improve formatting of tables being passed via subroutine
2860      calls.  This will also cause full indentation ('-i=n, default n= 4) of
2861      continued parameter list lines rather than just the number of spaces
2862      given with -ci=n, default n=2.
2863  
2864      -Added support for hanging side comments.  Perltidy identifies a hanging
2865      side comment as a comment immediately following a line with a side
2866      comment or another hanging side comment.  This should work in most
2867      cases.  It can be deactivated with --no-hanging-side-comments (-nhsc).
2868      The manual has been updated to discuss this.  Suggested by Brad
2869      Eisenberg some time ago, and finally implemented.
2870
2871   2001 06 08
2872      -fixed problem with parsing command parameters containing quoted
2873      strings in .perltidyrc files. (Reported by Roger Espel Llima 2001-06-07).
2874
2875      -added two command line flags, --want-break-after and 
2876      --want-break-before, which allow changing whether perltidy
2877      breaks lines before or after any operators.  Please see the revised 
2878      man pages for details.
2879
2880      -added system-wide configuration file capability.
2881      If perltidy does not find a .perltidyrc command line file in
2882      the current directory, nor in the home directory, it now looks
2883      for '/usr/local/etc/perltidyrc' and then for '/etc/perltidyrc'.
2884      (Suggested by Roger Espel Llima 2001-05-31).
2885
2886      -fixed problem in which spaces were trimmed from lines of a multi-line
2887      quote. (Reported by Roger Espel Llima 2001-05-30).  This is an 
2888      uncommon situation, but serious, because it could conceivably change
2889      the proper function of a script.
2890
2891      -fixed problem in which a semicolon was incorrectly added within 
2892      an anonymous hash.  (Reported by A.C. Yardley, 2001-5-23).
2893      (You would know if this happened, because perl would give a syntax
2894      error for the resulting script).
2895
2896      -fixed problem in which an incorrect error message was produced
2897       after a version number on a 'use' line, like this ( Reported 
2898       by Andres Kroonmaa, 2001-5-14):
2899
2900                   use CGI 2.42 qw(fatalsToBrowser);
2901
2902       Other than the extraneous error message, this bug was harmless.
2903
2904   2001 04 06
2905      -fixed serious bug in which the last line of some multi-line quotes or
2906       patterns was given continuation indentation spaces.  This may make
2907       a pattern incorrect unless it uses the /x modifier.  To find
2908       instances of this error in scripts which have been formatted with
2909       earlier versions of perltidy, run with the -chk flag, which has
2910       been added for this purpose (SLH, 2001-04-05).
2911
2912       ** So, please check previously formatted scripts by running with -chk
2913       at least once **
2914
2915      -continuation indentation has been reprogrammed to be hierarchical, 
2916       which improves deeply nested structures.
2917
2918      -fixed problem with undefined value in list formatting (reported by Michael
2919       Langner 2001-04-05)
2920
2921      -Switched to graphical display of nesting in .LOG files.  If an
2922       old format string was "(1 [0 {2", the new string is "{{(".  This
2923       is easier to read and also shows the order of nesting.
2924
2925      -added outdenting of cuddled paren structures, like  ")->pack(".
2926
2927      -added line break and outdenting of ')->' so that instead of
2928
2929             $mw->Label(
2930               -text   => "perltidy",
2931               -relief => 'ridge')->pack;
2932  
2933       the current default is:
2934
2935             $mw->Label(
2936               -text   => "perltidy",
2937               -relief => 'ridge'
2938             )->pack;
2939
2940       (requested by Michael Langner 2001-03-31; in the future this could 
2941       be controlled by a command-line parameter).
2942
2943      -revised list indentation logic, so that lists following an assignment
2944       operator get one full indentation level, rather than just continuation 
2945       indentation.  Also corrected some minor glitches in the continuation 
2946       indentation logic. 
2947
2948      -Fixed problem with unwanted continuation indentation after a blank line 
2949      (reported by Erik Thaysen 2001-03-28):
2950
2951      -minor update to avoid stranding a single '(' on one line
2952
2953   2001 03 28:
2954      -corrected serious error tokenizing filehandles, in which a sub call 
2955      after a print or printf, like this:
2956         print usage() and exit;
2957      became this:
2958         print usage () and exit;
2959      Unfortunately, this converts 'usage' to a filehandle.  To fix this, rerun
2960      perltidy; it will look for this situation and issue a warning. 
2961
2962      -fixed another cuddled-else formatting bug (Reported by Craig Bourne)
2963
2964      -added several diagnostic --dump routines
2965  
2966      -added token-level whitespace controls (suggested by Hans Ecke)
2967
2968   2001 03 23:
2969      -added support for special variables of the form ${^WANT_BITS}
2970
2971      -space added between scalar and left paren in 'for' and 'foreach' loops,
2972       (suggestion by Michael Cartmell):
2973
2974         for $i( 1 .. 20 )   # old
2975         for $i ( 1 .. 20 )   # new
2976
2977      -html now outputs cascading style sheets (thanks to suggestion from
2978       Hans Ecke)
2979
2980      -flags -o and -st now work with -html
2981
2982      -added missing -html documentation for comments (noted by Alex Izvorski)
2983
2984      -support for VMS added (thanks to Michael Cartmell for code patches and 
2985        testing)
2986
2987      -v-strings implemented (noted by Hans Ecke and Michael Cartmell; extensive
2988        testing by Michael Cartmell)
2989
2990      -fixed problem where operand may be empty at line 3970 
2991       (\b should be just b in lines 3970, 3973) (Thanks to Erik Thaysen, 
2992       Keith Marshall for bug reports)
2993
2994      -fixed -ce bug (cuddled else), where lines like '} else {' were indented
2995       (Thanks to Shawn Stepper and Rick Measham for reporting this)
2996
2997   2001 03 04:
2998      -fixed undefined value in line 153 (only worked with -I set)
2999      (Thanks to Mike Stok, Phantom of the Opcodes, Ian Ehrenwald, and others)
3000
3001      -fixed undefined value in line 1069 (filehandle problem with perl versions <
3002      5.6) (Thanks to Yuri Leikind, Mike Stok, Michael Holve, Jeff Kolber)
3003
3004   2001 03 03:
3005      -Initial announcement at freshmeat.net; started Change Log
3006      (Unfortunately this version was DOA, but it was fixed the next day)
3007