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