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