]> git.donarmstrong.com Git - perltidy.git/blob - CHANGES
update perltidy
[perltidy.git] / CHANGES
1 Perltidy Change Log
2   2007 08 01
3      -Added -fpsc option (--fixed-position-side-comment). Thanks to Ueli Hugenschmidt. 
4      For example -fpsc=40 tells perltidy to put side comments in column 40
5      if possible.  
6
7      -Added -bbao and -baao options (--break-before-all-operators and
8      --break-after-all-operators) to simplify command lines and configuration
9      files.  These define an initial preference for breaking at operators which can
10      be modified with -wba and -wbb flags.  For example to break before all operators
11      except an = one could use --bbao -wba='=' rather than listing every
12      single perl operator (except =) on a -wbb flag.
13
14      -Added -kis option (--keep-interior-semicolons).  Use the B<-kis> flag
15      to prevent breaking at a semicolon if there was no break there in the
16      input flag.  To illustrate, consider the following input lines:
17
18         dbmclose(%verb_delim); undef %verb_delim;
19         dbmclose(%expanded); undef %expanded;
20         dbmclose(%global); undef %global;
21
22      Normally these would be broken into six lines, but 
23      perltidy -kis gives:
24
25         dbmclose(%verb_delim); undef %verb_delim;
26         dbmclose(%expanded);   undef %expanded;
27         dbmclose(%global);     undef %global;
28  
29      -Improved formatting of complex ternary statements, with indentation
30      of nested statements.  
31       OLD:
32         return defined( $cw->{Selected} )
33           ? (wantarray)
34           ? @{ $cw->{Selected} }
35           : $cw->{Selected}[0]
36           : undef;
37
38       NEW:
39         return defined( $cw->{Selected} )
40           ? (wantarray)
41               ? @{ $cw->{Selected} }
42               : $cw->{Selected}[0]
43           : undef;
44
45      -Text following un-parenthesized if/unless/while/until statements get a
46      full level of indentation.  Suggested by Jeff Armstorng and others. 
47      OLD:
48         return $ship->chargeWeapons("phaser-canon")
49           if $encounter->description eq 'klingon'
50           and $ship->firepower >= $encounter->firepower
51           and $location->status ne 'neutral';
52      NEW:
53         return $ship->chargeWeapons("phaser-canon")
54           if $encounter->description eq 'klingon'
55               and $ship->firepower >= $encounter->firepower
56               and $location->status ne 'neutral';
57
58   2007 05 08
59      -Fixed bug where #line directives were being indented.  Thanks to
60      Philippe Bruhat.
61
62   2007 05 04
63      -Fixed problem where an extra blank line was added after an =cut when either
64      (a) the =cut started (not stopped) a POD section, or (b) -mbl > 1. 
65      Thanks to J. Robert Ray and Bill Moseley.
66
67   2007 04 24
68      -ole (--output-line-ending) and -ple (--preserve-line-endings) should
69      now work on all systems rather than just unix systems. Thanks to Dan
70      Tyrell.
71
72      -Fixed problem of a warning issued for multiple subs for BEGIN subs
73      and other control subs. Thanks to Heiko Eissfeldt.
74  
75      -Fixed problem where no space was introduced between a keyword or
76      bareword and a colon, such as:
77
78      ( ref($result) eq 'HASH' && !%$result ) ? undef: $result;
79
80      Thanks to Niek.
81
82      -Added a utility program 'break_long_quotes.pl' to the examples directory of
83      the distribution.  It breaks long quoted strings into a chain of concatenated
84      sub strings no longer than a selected length.  Suggested by Michael Renner as
85      a perltidy feature but was judged to be best done in a separate program.
86
87      -Updated docs to remove extra < and >= from list of tokens 
88      after which breaks are made by default.  Thanks to Bob Kleemann.
89
90      -Removed improper uses of $_ to avoid conflicts with external calls, giving
91      error message similar to:
92         Modification of a read-only value attempted at 
93         /usr/share/perl5/Perl/Tidy.pm line 6907.
94      Thanks to Michael Renner.
95
96      -Fixed problem when errorfile was not a plain filename or filehandle
97      in a call to Tidy.pm.  The call
98      perltidy(source => \$input, destination => \$output, errorfile => \$err);
99      gave the following error message:
100       Not a GLOB reference at /usr/share/perl5/Perl/Tidy.pm line 3827.
101      Thanks to Michael Renner and Phillipe Bruhat.
102
103      -Fixed problem where -sot would not stack an opening token followed by
104      a side comment.  Thanks to Jens Schicke.
105
106      -improved breakpoints in complex math and other long statements. Example:
107      OLD:
108         return
109           log($n) + 0.577215664901532 + ( 1 / ( 2 * $n ) ) -
110           ( 1 / ( 12 * ( $n**2 ) ) ) + ( 1 / ( 120 * ( $n**4 ) ) );
111      NEW:
112         return
113           log($n) + 0.577215664901532 +
114           ( 1 / ( 2 * $n ) ) -
115           ( 1 / ( 12 * ( $n**2 ) ) ) +
116           ( 1 / ( 120 * ( $n**4 ) ) );
117
118      -more robust vertical alignment of complex terminal else blocks and ternary
119      statements.
120
121   2006 07 19
122      -Eliminated bug where a here-doc invoked through an 'e' modifier on a pattern
123      replacement text was not recognized.  The tokenizer now recursively scans
124      replacement text (but does not reformat it).
125
126      -improved vertical alignment of terminal else blocks and ternary statements.
127       Thanks to Chris for the suggestion. 
128
129       OLD:
130         if    ( IsBitmap() ) { return GetBitmap(); }
131         elsif ( IsFiles() )  { return GetFiles(); }
132         else { return GetText(); }
133
134       NEW:
135         if    ( IsBitmap() ) { return GetBitmap(); }
136         elsif ( IsFiles() )  { return GetFiles(); }
137         else                 { return GetText(); }
138
139       OLD:
140         $which_search =
141             $opts{"t"} ? 'title'
142           : $opts{"s"} ? 'subject'
143           : $opts{"a"} ? 'author'
144           : 'title';
145
146       NEW:
147         $which_search =
148             $opts{"t"} ? 'title'
149           : $opts{"s"} ? 'subject'
150           : $opts{"a"} ? 'author'
151           :              'title';
152
153      -improved indentation of try/catch blocks and other externally defined
154      functions accepting a block argument.  Thanks to jae.
155
156      -Added support for Perl 5.10 features say and smartmatch.
157
158      -Added flag -pbp (--perl-best-practices) as an abbreviation for parameters
159      suggested in Damian Conway's "Perl Best Practices".  -pbp is the same as:
160
161         -l=78 -i=4 -ci=4 -st -se -vt=2 -cti=0 -pt=1 -bt=1 -sbt=1 -bbt=1 -nsfs -nolq
162         -wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = 
163               **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="
164
165       Please note that the -st here restricts input to standard input; use
166       -nst if necessary to override.
167
168      -Eliminated some needless breaks at equals signs in -lp indentation.
169
170         OLD:
171             $c =
172               Math::Complex->make(LEFT + $x * (RIGHT - LEFT) / SIZE,
173                                   TOP + $y * (BOTTOM - TOP) / SIZE);
174         NEW:
175             $c = Math::Complex->make(LEFT + $x * (RIGHT - LEFT) / SIZE,
176                                      TOP + $y * (BOTTOM - TOP) / SIZE);
177
178      A break at an equals is sometimes useful for preventing complex statements 
179      from hitting the line length limit.  The decision to do this was 
180      over-eager in some cases and has been improved.  Thanks to Royce Reece.
181
182      -qw quotes contained in braces, square brackets, and parens are being
183      treated more like those containers as far as stacking of tokens.  Also
184      stack of closing tokens ending ');' will outdent to where the ');' would
185      have outdented if the closing stack is matched with a similar opening stack.
186
187       OLD: perltidy -soc -sct
188         __PACKAGE__->load_components(
189             qw(
190               PK::Auto
191               Core
192               )
193         );
194       NEW: perltidy -soc -sct
195         __PACKAGE__->load_components( qw(
196               PK::Auto
197               Core
198         ) );
199       Thanks to Aran Deltac
200
201      -Eliminated some undesirable or marginally desirable vertical alignments.
202      These include terminal colons, opening braces, and equals, and particularly
203      when just two lines would be aligned.
204
205      OLD:
206         my $accurate_timestamps = $Stamps{lnk};
207         my $has_link            = 
208             ...
209      NEW:
210         my $accurate_timestamps = $Stamps{lnk};
211         my $has_link =
212
213      -Corrected a problem with -mangle in which a space would be removed
214      between a keyword and variable beginning with ::.
215
216   2006 06 14
217      -Attribute argument lists are now correctly treated as quoted strings
218      and not formatted.  This is the most important update in this version.
219      Thanks to Borris Zentner, Greg Ferguson, Steve Kirkup.
220
221      -Updated to recognize the defined or operator, //, to be released in Perl 10.
222      Thanks to Sebastien Aperghis-Tramoni.
223
224      -A useful utility perltidyrc_dump.pl is included in the examples section.  It
225      will read any perltidyrc file and write it back out in a standard format
226      (though comments are lost).
227
228      -Added option to have perltidy read and return a hash with the contents of a
229      perltidyrc file.  This may be used by Leif Eriksen's tidyview code.  This
230      feature is used by the demonstration program 'perltidyrc_dump.pl' in the
231      examples directory.
232
233      -Improved error checking in perltidyrc files.  Unknown bare words were not
234      being caught.
235
236      -The --dump-options parameter now dumps parameters in the format required by a
237      perltidyrc file.
238
239      -V-Strings with underscores are now recognized.
240      For example: $v = v1.2_3; 
241
242      -cti=3 option added which gives one extra indentation level to closing 
243      tokens always.  This provides more predictable closing token placement
244      than cti=2.  If you are using cti=2 you might want to try cti=3.
245
246      -To identify all left-adjusted comments as static block comments, use C<-sbcp='^#'>.
247
248      -New parameters -fs, -fsb, -fse added to allow sections of code between #<<<
249      and #>>> to be passed through verbatim. This is enabled by default and turned
250      off by -nfs.  Flags -fsb and -fse allow other beginning and ending markers.
251      Thanks to Wolfgang Werner and Marion Berryman for suggesting this.  
252
253      -added flag -skp to put a space between all Perl keywords and following paren.
254      The default is to only do this for certain keywords.  Suggested by
255      H.Merijn Brand.
256
257      -added flag -sfp to put a space between a function name and following paren.
258      The default is not to do this.  Suggested by H.Merijn Brand.
259
260      -Added patch to avoid breaking GetOpt::Long::Configure set by calling program. 
261      Thanks to Philippe Bruhat.
262
263      -An error was fixed in which certain parameters in a .perltidyrc file given
264      without the equals sign were not recognized.  That is,
265      '--brace-tightness 0' gave an error but '--brace-tightness=0' worked
266      ok.  Thanks to Zac Hansen.
267
268      -An error preventing the -nwrs flag from working was corrected. Thanks to
269       Greg Ferguson.
270
271      -Corrected some alignment problems with entab option.
272
273      -A bug with the combination of -lp and -extrude was fixed (though this
274      combination doesn't really make sense).  The bug was that a line with
275      a single zero would be dropped.  Thanks to Cameron Hayne.
276
277      -Updated Windows detection code to avoid an undefined variable.
278      Thanks to Joe Yates and Russ Jones.
279
280      -Improved formatting for short trailing statements following a closing paren.
281      Thanks to Joe Matarazzo.
282
283      -The handling of the -icb (indent closing block braces) flag has been changed
284      slightly to provide more consistent and predictable formatting of complex
285      structures.  Instead of giving a closing block brace the indentation of the
286      previous line, it is now given one extra indentation level.  The two methods
287      give the same result if the previous line was a complete statement, as in this
288      example:
289
290             if ($task) {
291                 yyy();
292                 }    # -icb
293             else {
294                 zzz();
295                 }
296      The change also fixes a problem with empty blocks such as:
297
298         OLD, -icb:
299         elsif ($debug) {
300         }
301
302         NEW, -icb:
303         elsif ($debug) {
304             }
305
306      -A problem with -icb was fixed in which a closing brace was misplaced when
307      it followed a quote which spanned multiple lines.
308
309      -Some improved breakpoints for -wba='&& || and or'
310
311      -Fixed problem with misaligned cuddled else in complex statements
312      when the -bar flag was also used.  Thanks to Alex and Royce Reese.
313
314      -Corrected documentation to show that --outdent-long-comments is the default.
315      Thanks to Mario Lia.
316
317      -New flag -otr (opening-token-right) is similar to -bar (braces-always-right)
318      but applies to non-structural opening tokens.
319
320      -new flags -sot (stack-opening-token), -sct (stack-closing-token).
321      Suggested by Tony.
322
323   2003 10 21
324      -The default has been changed to not do syntax checking with perl.  
325        Use -syn if you want it.  Perltidy is very robust now, and the -syn
326        flag now causes more problems than it's worth because of BEGIN blocks
327        (which get executed with perl -c).  For example, perltidy will never
328        return when trying to beautify this code if -syn is used:
329
330             BEGIN { 1 while { }; }
331
332       Although this is an obvious error, perltidy is often run on untested
333       code which is more likely to have this sort of problem.  A more subtle
334       example is:
335
336             BEGIN { use FindBin; }
337
338       which may hang on some systems using -syn if a shared file system is
339       unavailable.
340
341      -Changed style -gnu to use -cti=1 instead of -cti=2 (see next item).
342       In most cases it looks better.  To recover the previous format, use
343       '-gnu -cti=2'
344
345      -Added flags -cti=n for finer control of closing token indentation.
346        -cti = 0 no extra indentation (default; same as -nicp)
347        -cti = 1 enough indentation so that the closing token
348             aligns with its opening token.
349        -cti = 2 one extra indentation level if the line has the form 
350               );   ];   or   };     (same as -icp).
351
352        The new option -cti=1 works well with -lp:
353
354        EXAMPLES:
355
356         # perltidy -lp -cti=1
357         @month_of_year = (
358                            'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
359                            'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
360                          );
361
362         # perltidy -lp -cti=2
363         @month_of_year = (
364                            'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
365                            'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
366                            );
367       This is backwards compatible with -icp. See revised manual for
368       details.  Suggested by Mike Pennington.
369   
370      -Added flag '--preserve-line-endings' or '-ple' to cause the output
371       line ending to be the same as in the input file, for unix, dos, 
372       or mac line endings.  Only works under unix. Suggested by 
373       Rainer Hochschild.
374
375      -Added flag '--output-line-ending=s' or '-ole=s' where s=dos or win,
376       unix, or mac.  Only works under unix.
377
378      -Files with Mac line endings should now be handled properly under unix
379       and dos without being passed through a converter.
380
381      -You may now include 'and', 'or', and 'xor' in the list following
382       '--want-break-after' to get line breaks after those keywords rather than
383       before them.  Suggested by Rainer Hochschild.
384
385      -Corrected problem with command line option for -vtc=n and -vt=n. The
386       equals sign was being eaten up by the Windows shell so perltidy didn't
387       see it.
388
389   2003 07 26
390      -Corrected cause of warning message with recent versions of Perl:
391         "Possible precedence problem on bitwise & operator at ..."
392       Thanks to Jim Files.
393
394      -fixed bug with -html with '=for pod2html' sections, in which code/pod
395      output order was incorrect.  Thanks to Tassilo von Parseval.
396
397      -fixed bug when the -html flag is used, in which the following error
398      message, plus others, appear:
399          did not see <body> in pod2html output
400      This was caused by a change in the format of html output by pod2html
401      VERSION 1.04 (included with perl 5.8).  Thanks to Tassilo von Parseval.
402
403      -Fixed bug where an __END__ statement would be mistaken for a label
404      if it is immediately followed by a line with a leading colon. Thanks
405      to John Bayes.
406  
407      -Implemented guessing logic for brace types when it is ambiguous.  This
408      has been on the TODO list a long time.  Thanks to Boris Zentner for
409      an example.
410
411      -Long options may now be negated either as '--nolong-option' 
412      or '--no-long-option'.  Thanks to Philip Newton for the suggestion.
413
414      -added flag --html-entities or -hent which controls the use of
415      Html::Entities for html formatting.  Use --nohtml-entities or -nhent to
416      prevent the use of Html::Entities to encode special symbols.  The
417      default is -hent.  Html::Entities when formatting perl text to escape
418      special symbols.  This may or may not be the right thing to do,
419      depending on browser/language combinations.  Thanks to Burak Gursoy for
420      this suggestion.
421
422      -Bareword strings with leading '-', like, '-foo' now count as 1 token
423      for horizontal tightness.  This way $a{'-foo'}, $a{foo}, and $a{-foo}
424      are now all treated similarly.  Thus, by default, OLD: $a{ -foo } will
425      now be NEW: $a{-foo}.  Suggested by Mark Olesen.
426
427      -added 2 new flags to control spaces between keywords and opening parens:
428        -sak=s  or --space-after-keyword=s,  and
429        -nsak=s or --nospace-after-keyword=s, where 's' is a list of keywords.
430
431      The new default list of keywords which get a space is:
432
433        "my local our and or eq ne if else elsif until unless while for foreach
434          return switch case given when"
435
436      Use -sak=s and -nsak=s to add and remove keywords from this list,
437         respectively.
438
439      Explanation: Stephen Hildrey noted that perltidy was being inconsistent
440      in placing spaces between keywords and opening parens, and sent a patch
441      to give user control over this.  The above list was selected as being
442      a reasonable default keyword list.  Previously, perltidy
443      had a hardwired list which also included these keywords:
444
445             push pop shift unshift join split die
446
447      but did not have 'our'.  Example: if you prefer to make perltidy behave
448      exactly as before, you can include the following two lines in your
449      .perltidyrc file: 
450
451        -sak="push pop local shift unshift join split die"
452        -nsak="our"
453
454      -Corrected html error in .toc file when -frm -html is used (extra ");
455       browsers were tolerant of it.
456
457      -Improved alignment of chains of binary and ?/: operators. Example:
458       OLD:
459         $leapyear =
460           $year % 4     ? 0
461           : $year % 100 ? 1
462           : $year % 400 ? 0
463           : 1;
464       NEW:
465         $leapyear =
466             $year % 4   ? 0
467           : $year % 100 ? 1
468           : $year % 400 ? 0
469           : 1;
470
471      -improved breakpoint choices involving '->'
472
473      -Corrected tokenization of things like ${#} or ${©}. For example,
474       ${©} is valid, but ${© } is a syntax error.
475
476      -Corrected minor tokenization errors with indirect object notation.
477       For example, 'new A::()' works now.
478
479      -Minor tokenization improvements; all perl code distributed with perl 5.8 
480       seems to be parsed correctly except for one instance (lextest.t) 
481       of the known bug.
482
483   2002 11 30
484      -Implemented scalar attributes.  Thanks to Sean Tobin for noting this.
485
486      -Fixed glitch introduced in previous release where -pre option
487      was not outputting a leading html <pre> tag.
488
489      -Numerous minor improvements in vertical alignment, including the following:
490
491      -Improved alignment of opening braces in many cases.  Needed for improved
492      switch/case formatting, and also suggested by Mark Olesen for sort/map/grep
493      formatting.  For example:
494
495       OLD:
496         @modified =
497           map { $_->[0] }
498           sort { $a->[1] <=> $b->[1] }
499           map { [ $_, -M ] } @filenames;
500
501       NEW:
502         @modified =
503           map  { $_->[0] }
504           sort { $a->[1] <=> $b->[1] }
505           map  { [ $_, -M ] } @filenames;
506
507      -Eliminated alignments across unrelated statements. Example:
508       OLD:
509         $borrowerinfo->configure( -state => 'disabled' );
510         $borrowerinfo->grid( -col        => 1, -row => 0, -sticky => 'w' );
511
512       NEW:  
513         $borrowerinfo->configure( -state => 'disabled' );
514         $borrowerinfo->grid( -col => 1, -row => 0, -sticky => 'w' );
515
516       Thanks to Mark Olesen for suggesting this.
517
518      -Improved alignement of '='s in certain cases.
519       Thanks to Norbert Gruener for sending an example.
520
521      -Outdent-long-comments (-olc) has been re-instated as a default, since
522       it works much better now.  Use -nolc if you want to prevent it.
523
524      -Added check for 'perltidy file.pl -o file.pl', which causes file.pl
525      to be lost. (The -b option should be used instead). Thanks to mreister
526      for reporting this problem.
527
528   2002 11 06
529      -Switch/case or given/when syntax is now recognized.  Its vertical alignment
530      is not great yet, but it parses ok.  The words 'switch', 'case', 'given',
531      and 'when' are now treated as keywords.  If this causes trouble with older
532      code, we could introduce a switch to deactivate it.  Thanks to Stan Brown
533      and Jochen Schneider for recommending this.
534
535      -Corrected error parsing sub attributes with call parameters.
536      Thanks to Marc Kerr for catching this.
537
538      -Sub prototypes no longer need to be on the same line as sub names.  
539
540      -a new flag -frm or --frames will cause html output to be in a
541      frame, with table of contents in the left panel and formatted source
542      in the right panel.  Try 'perltidy -html -frm somemodule.pm' for example.
543
544      -The new default for -html formatting is to pass the pod through Pod::Html.
545      The result is syntax colored code within your pod documents. This can be
546      deactivated with -npod.  Thanks to those who have written to discuss this,
547      particularly Mark Olesen and Hugh Myers.
548
549      -the -olc (--outdent-long-comments) option works much better.  It now outdents
550      groups of consecutive comments together, and by just the amount needed to
551      avoid having any one line exceeding the maximum line length.
552
553      -block comments are now trimmed of trailing whitespace.
554
555      -if a directory specified with -opath does not exist, it will be created.
556
557      -a table of contents to packages and subs is output when -html is used.
558      Use -ntoc to prevent this. 
559
560      -fixed an unusual bug in which a 'for' statement following a 'format'
561      statement was not correctly tokenized.  Thanks to Boris Zentner for
562      catching this.
563
564      -Tidy.pm is no longer dependent on modules IO::Scalar and IO::ScalarArray.  
565      There were some speed issues.  Suggested by Joerg Walter.
566
567      -The treatment of quoted wildcards (file globs) is now system-independent. 
568      For example
569
570         perltidy 'b*x.p[lm]'
571
572      would match box.pl, box.pm, brinx.pm under any operating system.  Of
573      course, anything unquoted will be subject to expansion by any shell.
574
575      -default color for keywords under -html changed from 
576      SaddleBrown (#8B4513) to magenta4 (#8B008B).
577
578      -fixed an arg parsing glitch in which something like:
579        perltidy quick-help
580      would trigger the help message and exit, rather than operate on the
581      file 'quick-help'.
582
583   2002 09 22
584      -New option '-b' or '--backup-and-modify-in-place' will cause perltidy to
585      overwrite the original file with the tidied output file.  The original
586      file will be saved with a '.bak' extension (which can be changed with
587      -bext=s).  Thanks to Rudi Farkas for the suggestion.
588
589      -An index to all subs is included at the top of -html output, unless
590      only the <pre> section is written.
591
592      -Anchor lines of the form <a name="mysub"></a> are now inserted at key points
593      in html output, such as before sub definitions, for the convenience of
594      postprocessing scripts.  Suggested by Howard Owen.
595
596      -The cuddled-else (-ce) flag now also makes cuddled continues, like
597      this:
598
599         while ( ( $pack, $file, $line ) = caller( $i++ ) ) {
600            # bla bla
601         } continue {
602             $prevpack = $pack;
603         }
604
605      Suggested by Simon Perreault.  
606
607      -Fixed bug in which an extra blank line was added before an =head or 
608      similar pod line after an __END__ or __DATA__ line each time 
609      perltidy was run.  Also, an extra blank was being added after
610      a terminal =cut.  Thanks to Mike Birdsall for reporting this.
611
612   2002 08 26
613      -Fixed bug in which space was inserted in a hyphenated hash key:
614         my $val = $myhash{USER-NAME};
615       was converted to:
616         my $val = $myhash{USER -NAME}; 
617       Thanks to an anonymous bug reporter at sourceforge.
618
619      -Fixed problem with the '-io' ('--indent-only') where all lines 
620       were double spaced.  Thanks to Nick Andrew for reporting this bug.
621
622      -Fixed tokenization error in which something like '-e1' was 
623       parsed as a number. 
624
625      -Corrected a rare problem involving older perl versions, in which 
626       a line break before a bareword caused problems with 'use strict'.
627       Thanks to Wolfgang Weisselberg for noting this.
628
629      -More syntax error checking added.
630
631      -Outdenting labels (-ola) has been made the default, in order to follow the
632       perlstyle guidelines better.  It's probably a good idea in general, but
633       if you do not want this, use -nola in your .perltidyrc file.
634   
635      -Updated rules for padding logical expressions to include more cases.
636       Thanks to Wolfgang Weisselberg for helpful discussions.
637
638      -Added new flag -osbc (--outdent-static-block-comments) which will
639       outdent static block comments by 2 spaces (or whatever -ci equals).
640       Requested by Jon Robison.
641
642   2002 04 25
643      -Corrected a bug, introduced in the previous release, in which some
644       closing side comments (-csc) could have incorrect text.  This is
645       annoying but will be correct the next time perltidy is run with -csc.
646
647      -Implemented XHTML patch submitted by Ville Skyttä.
648
649      -Fixed bug where whitespace was being removed between 'Bar' and '()' 
650       in a use statement like:
651
652            use Foo::Bar ();
653
654       Thanks to Ville Skyttä for reporting this.
655
656      -Whenever possible, if a logical expression is broken with leading
657       '&&', '||', 'and', or 'or', then the leading line will be padded
658       with additional space to produce alignment.  This has been on the
659       todo list for a long time; thanks to Frank Steinhauer for reminding
660       me to do it.  Notice the first line after the open parens here:
661
662             OLD: perltidy -lp
663             if (
664                  !param("rules.to.$linecount")
665                  && !param("rules.from.$linecount")
666                  && !param("rules.subject.$linecount")
667                  && !(
668                        param("rules.fieldname.$linecount")
669                        && param("rules.fieldval.$linecount")
670                  )
671                  && !param("rules.size.$linecount")
672                  && !param("rules.custom.$linecount")
673               )
674
675             NEW: perltidy -lp
676             if (
677                     !param("rules.to.$linecount")
678                  && !param("rules.from.$linecount")
679                  && !param("rules.subject.$linecount")
680                  && !(
681                           param("rules.fieldname.$linecount")
682                        && param("rules.fieldval.$linecount")
683                  )
684                  && !param("rules.size.$linecount")
685                  && !param("rules.custom.$linecount")
686               )
687
688   2002 04 16
689      -Corrected a mistokenization of variables for a package with a name
690       equal to a perl keyword.  For example: 
691
692          my::qx();
693          package my;
694          sub qx{print "Hello from my::qx\n";}
695
696       In this case, the leading 'my' was mistokenized as a keyword, and a
697       space was being place between 'my' and '::'.  This has been
698       corrected.  Thanks to Martin Sluka for discovering this. 
699
700      -A new flag -bol (--break-at-old-logic-breakpoints)
701       has been added to control whether containers with logical expressions
702       should be broken open.  This is the default.
703
704      -A new flag -bok (--break-at-old-keyword-breakpoints)
705       has been added to follow breaks at old keywords which return lists,
706       such as sort and map.  This is the default.
707
708      -A new flag -bot (--break-at-old-trinary-breakpoints) has been added to
709       follow breaks at trinary (conditional) operators.  This is the default.
710
711      -A new flag -cab=n has been added to control breaks at commas after
712       '=>' tokens.  The default is n=1, meaning break unless this breaks
713       open an existing on-line container.
714
715      -A new flag -boc has been added to allow existing list formatting
716       to be retained.  (--break-at-old-comma-breakpoints).  See updated manual.
717
718      -A new flag -iob (--ignore-old-breakpoints) has been added to
719       prevent the locations of old breakpoints from influencing the output
720       format.
721
722      -Corrected problem where nested parentheses were not getting full
723       indentation.  This has been on the todo list for some time; thanks 
724       to Axel Rose for a snippet demonstrating this issue.
725
726                 OLD: inner list is not indented
727                 $this->sendnumeric(
728                     $this->server,
729                     (
730                       $ret->name,        $user->username, $user->host,
731                     $user->server->name, $user->nick,     "H"
732                     ),
733                 );
734
735                 NEW:
736                 $this->sendnumeric(
737                     $this->server,
738                     (
739                         $ret->name,          $user->username, $user->host,
740                         $user->server->name, $user->nick,     "H"
741                     ),
742                 );
743
744      -Code cleaned up by removing the following unused, undocumented flags.
745       They should not be in any .perltidyrc files because they were just
746       experimental flags which were never documented.  Most of them placed
747       artificial limits on spaces, and Wolfgang Weisselberg convinced me that
748       most of them they do more harm than good by causing unexpected results.
749
750       --maximum-continuation-indentation (-mci)
751       --maximum-whitespace-columns
752       --maximum-space-to-comment (-xsc)
753       --big-space-jump (-bsj)
754
755      -Pod file 'perltidy.pod' has been appended to the script 'perltidy', and
756       Tidy.pod has been append to the module 'Tidy.pm'.  Older MakeMaker's
757       were having trouble.
758  
759      -A new flag -isbc has been added for more control on comments. This flag
760       has the effect that if there is no leading space on the line, then the
761       comment will not be indented, and otherwise it may be.  If both -ibc and
762       -isbc are set, then -isbc takes priority.  Thanks to Frank Steinhauer
763       for suggesting this.
764
765      -A new document 'stylekey.pod' has been created to quickly guide new users
766       through the maze of perltidy style parameters.  An html version is 
767       on the perltidy web page.  Take a look! It should be very helpful.
768
769      -Parameters for controlling 'vertical tightness' have been added:
770       -vt and -vtc are the main controls, but finer control is provided
771       with -pvt, -pcvt, -bvt, -bcvt, -sbvt, -sbcvt.  Block brace vertical
772       tightness controls have also been added.
773       See updated manual and also see 'stylekey.pod'. Simple examples:
774
775         # perltidy -lp -vt=1 -vtc=1
776         @month_of_year = ( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
777                            'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' );
778
779         # perltidy -lp -vt=1 -vtc=0
780         @month_of_year = ( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
781                            'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
782         );
783
784      -Lists which do not format well in uniform columns are now better
785       identified and formated.
786
787         OLD:
788         return $c->create( 'polygon', $x, $y, $x + $ruler_info{'size'},
789             $y + $ruler_info{'size'}, $x - $ruler_info{'size'},
790             $y + $ruler_info{'size'} );
791
792         NEW:
793         return $c->create(
794             'polygon', $x, $y,
795             $x + $ruler_info{'size'},
796             $y + $ruler_info{'size'},
797             $x - $ruler_info{'size'},
798             $y + $ruler_info{'size'}
799         );
800
801         OLD:
802           radlablist($f1, pad('Initial', $p), $b->{Init}->get_panel_ref, 'None ',
803                      'None', 'Default', 'Default', 'Simple', 'Simple');
804         NEW:
805           radlablist($f1,
806                      pad('Initial', $p),
807                      $b->{Init}->get_panel_ref,
808                      'None ', 'None', 'Default', 'Default', 'Simple', 'Simple');
809
810      -Corrected problem where an incorrect html filename was generated for 
811       external calls to Tidy.pm module.  Fixed incorrect html title when
812       Tidy.pm is called with IO::Scalar or IO::Array source.
813
814      -Output file permissons are now set as follows.  An output script file
815       gets the same permission as the input file, except that owner
816       read/write permission is added (otherwise, perltidy could not be
817       rerun).  Html output files use system defaults.  Previously chmod 0755
818       was used in all cases.  Thanks to Mark Olesen for bringing this up.
819
820      -Missing semicolons will not be added in multi-line blocks of type
821       sort, map, or grep.  This brings perltidy into closer agreement
822       with common practice.  Of course, you can still put semicolons 
823       there if you like.  Thanks to Simon Perreault for a discussion of this.
824
825      -Most instances of extra semicolons are now deleted.  This is
826       particularly important if the -csc option is used.  Thanks to Wolfgang
827       Weisselberg for noting this.  For example, the following line
828       (produced by 'h2xs' :) has an extra semicolon which will now be
829       removed:
830
831          BEGIN { plan tests => 1 };
832
833      -New parameter -csce (--closing-side-comment-else-flag) can be used
834       to control what text is appended to 'else' and 'elsif' blocks.
835       Default is to just add leading 'if' text to an 'else'.  See manual.
836
837      -The -csc option now labels 'else' blocks with additinal information
838       from the opening if statement and elsif statements, if space.
839       Thanks to Wolfgang Weisselberg for suggesting this.
840
841      -The -csc option will now remove any old closing side comments
842       below the line interval threshold. Thanks to Wolfgang Weisselberg for
843       suggesting this.
844
845      -The abbreviation feature, which was broken in the previous version,
846       is now fixed.  Thanks to Michael Cartmell for noting this.
847
848      -Vertical alignment is now done for '||='  .. somehow this was 
849       overlooked.
850
851   2002 02 25
852      -This version uses modules for the first time, and a standard perl
853       Makefile.PL has been supplied.  However, perltidy may still be
854       installed as a single script, without modules.  See INSTALL for
855       details.
856
857      -The man page 'perl2web' has been merged back into the main 'perltidy'
858       man page to simplify installation.  So you may remove that man page
859       if you have an older installation.
860
861      -Added patch from Axel Rose for MacPerl.  The patch prompts the user
862       for command line arguments before calling the module 
863       Perl::Tidy::perltidy.
864
865      -Corrected bug with '-bar' which was introduced in the previous
866       version.  A closing block brace was being indented.  Thanks to
867       Alexandros M Manoussakis for reporting this.
868
869      -New parameter '--entab-leading-whitespace=n', or '-et=n', has been
870       added for those who prefer tabs.  This behaves different from the
871       existing '-t' parameter; see updated man page.  Suggested by Mark
872       Olesen.
873
874      -New parameter '--perl-syntax-check-flags=s'  or '-pcsf=s' can be
875       used to change the flags passed to perltidy in a syntax check.
876       See updated man page.  Suggested by Mark Olesen. 
877
878      -New parameter '--output-path=s'  or '-opath=s' will cause output
879       files to be placed in directory s.  See updated man page.  Thanks for
880       Mark Olesen for suggesting this.
881
882      -New parameter --dump-profile (or -dpro) will dump to
883       standard output information about the search for a
884       configuration file, the name of whatever configuration file
885       is selected, and its contents.  This should help debugging
886       config files, especially on different Windows systems.
887
888      -The -w parameter now notes possible errors of the form:
889
890             $comment = s/^\s*(\S+)\..*/$1/;   # trim whitespace
891
892      -Corrections added for a leading ':' and for leaving a leading 'tcsh'
893       line untouched.  Mark Olesen reported that lines of this form were
894       accepted by perl but not by perltidy:
895
896             : # use -*- perl -*-
897             eval 'exec perl -wS $0 "$@"'  # shell should exec 'perl'
898             unless 1;                     # but Perl should skip this one
899
900       Perl will silently swallow a leading colon on line 1 of a
901       script, and now perltidy will do likewise.  For example,
902       this is a valid script, provided that it is the first line,
903       but not otherwise:
904
905             : print "Hello World\n";
906   
907       Also, perltidy will now mark a first line with leading ':' followed by
908       '#' as type SYSTEM (just as a #!  line), not to be formatted.
909
910      -List formatting improved for certain lists with special
911       initial terms, such as occur with 'printf', 'sprintf',
912       'push', 'pack', 'join', 'chmod'.  The special initial term is
913       now placed on a line by itself.  For example, perltidy -gnu
914
915          OLD:
916             $Addr = pack(
917                          "C4",                hex($SourceAddr[0]),
918                          hex($SourceAddr[1]), hex($SourceAddr[2]),
919                          hex($SourceAddr[3])
920                          );
921
922          NEW:
923             $Addr = pack("C4",
924                          hex($SourceAddr[0]), hex($SourceAddr[1]),
925                          hex($SourceAddr[2]), hex($SourceAddr[3]));
926
927           OLD:
928                 push (
929                       @{$$self{states}}, '64', '66', '68',
930                       '70',              '72', '74', '76',
931                       '78',              '80', '82', '84',
932                       '86',              '88', '90', '92',
933                       '94',              '96', '98', '100',
934                       '102',             '104'
935                       );
936
937           NEW:
938                 push (
939                       @{$$self{states}},
940                       '64', '66', '68', '70', '72',  '74',  '76',
941                       '78', '80', '82', '84', '86',  '88',  '90',
942                       '92', '94', '96', '98', '100', '102', '104'
943                       );
944
945      -Lists of complex items, such as matricies, are now detected
946       and displayed with just one item per row:
947
948         OLD:
949         $this->{'CURRENT'}{'gfx'}{'MatrixSkew'} = Text::PDF::API::Matrix->new(
950             [ 1, tan( deg2rad($a) ), 0 ], [ tan( deg2rad($b) ), 1, 0 ],
951             [ 0, 0, 1 ]
952         );
953
954         NEW:
955         $this->{'CURRENT'}{'gfx'}{'MatrixSkew'} = Text::PDF::API::Matrix->new(
956             [ 1,                  tan( deg2rad($a) ), 0 ],
957             [ tan( deg2rad($b) ), 1,                  0 ],
958             [ 0,                  0,                  1 ]
959         );
960
961      -The perl syntax check will be turned off for now when input is from
962       standard input or standard output.  The reason is that this requires
963       temporary files, which has produced far too many problems during
964       Windows testing.  For example, the POSIX module under Windows XP/2000
965       creates temporary names in the root directory, to which only the
966       administrator should have permission to write.
967
968      -Merged patch sent by Yves Orton to handle appropriate
969       configuration file locations for different Windows varieties
970       (2000, NT, Me, XP, 95, 98).
971
972      -Added patch to properly handle a for/foreach loop without
973       parens around a list represented as a qw.  I didn't know this
974       was possible until Wolfgang Weisselberg pointed it out:
975
976             foreach my $key qw\Uno Due Tres Quadro\ {
977                 print "Set $key\n";
978             }
979
980       But Perl will give a syntax error without the $ variable; ie this will
981       not work:
982
983             foreach qw\Uno Due Tres Quadro\ {
984                 print "Set $_\n";
985             }
986
987      -Merged Windows version detection code sent by Yves Orton.  Perltidy
988       now automatically turns off syntax checking for Win 9x/ME versions,
989       and this has solved a lot of robustness problems.  These systems 
990       cannot reliably handle backtick operators.  See man page for
991       details.
992   
993      -Merged VMS filename handling patch sent by Michael Cartmell.  (Invalid
994       output filenames were being created in some cases). 
995
996      -Numerous minor improvements have been made for -lp style indentation.
997
998      -Long C-style 'for' expressions will be broken after each ';'.   
999
1000       'perltidy -gnu' gives:
1001
1002         OLD:
1003         for ($status = $db->seq($key, $value, R_CURSOR()) ; $status == 0
1004              and $key eq $origkey ; $status = $db->seq($key, $value, R_NEXT())) 
1005
1006         NEW:
1007         for ($status = $db->seq($key, $value, R_CURSOR()) ;
1008              $status == 0 and $key eq $origkey ;
1009              $status = $db->seq($key, $value, R_NEXT()))
1010
1011      -For the -lp option, a single long term within parens
1012       (without commas) now has better alignment.  For example,
1013       perltidy -gnu
1014
1015                 OLD:
1016                 $self->throw("Must specify a known host, not $location,"
1017                       . " possible values ("
1018                       . join (",", sort keys %hosts) . ")");
1019
1020                 NEW:
1021                 $self->throw("Must specify a known host, not $location,"
1022                              . " possible values ("
1023                              . join (",", sort keys %hosts) . ")");
1024
1025   2001 12 31
1026      -This version is about 20 percent faster than the previous
1027       version as a result of optimization work.  The largest gain
1028       came from switching to a dispatch hash table in the
1029       tokenizer.
1030
1031      -perltidy -html will check to see if HTML::Entities is
1032       installed, and if so, it will use it to encode unsafe
1033       characters.
1034
1035      -Added flag -oext=ext to change the output file extension to
1036       be different from the default ('tdy' or 'html').  For
1037       example:
1038
1039         perltidy -html -oext=htm filename
1040
1041      will produce filename.htm
1042
1043      -Added flag -cscw to issue warnings if a closing side comment would replace
1044      an existing, different side comments.  See the man page for details.
1045      Thanks to Peter Masiar for helpful discussions.
1046
1047      -Corrected tokenization error of signed hex/octal/binary numbers. For
1048      example, the first hex number below would have been parsed correctly
1049      but the second one was not:
1050         if ( ( $tmp >= 0x80_00_00 ) || ( $tmp < -0x80_00_00 ) ) { }
1051
1052      -'**=' was incorrectly tokenized as '**' and '='.  This only
1053          caused a problem with the -extrude opton.
1054
1055      -Corrected a divide by zero when -extrude option is used
1056
1057      -The flag -w will now contain all errors reported by 'perl -c' on the
1058      input file, but otherwise they are not reported.  The reason is that
1059      perl will report lots of problems and syntax errors which are not of
1060      interest when only a small snippet is being formatted (such as missing
1061      modules and unknown bare words).  Perltidy will always report all
1062      significant syntax errors that it finds, such as unbalanced braces,
1063      unless the -q (quiet) flag is set.
1064
1065      -Merged modifications created by Hugh Myers into perltidy.
1066       These include a 'streamhandle' routine which allows perltidy
1067       as a module to operate on input and output arrays and strings
1068       in addition to files.  Documentation and new packaging as a
1069       module should be ready early next year; This is an elegant,
1070       powerful update; many thanks to Hugh for contributing it.
1071
1072   2001 11 28
1073      -added a tentative patch which tries to keep any existing breakpoints
1074      at lines with leading keywords map,sort,eval,grep. The idea is to
1075      improve formatting of sequences of list operations, as in a schwartzian
1076      transform.  Example:
1077
1078         INPUT:
1079         my @sorted = map { $_->[0] }
1080                      sort { $a->[1] <=> $b->[1] }
1081                      map { [ $_, rand ] } @list;
1082
1083         OLD:
1084         my @sorted =
1085           map { $_->[0] } sort { $a->[1] <=> $b->[1] } map { [ $_, rand ] } @list;
1086
1087         NEW:
1088         my @sorted = map { $_->[0] }
1089           sort { $a->[1] <=> $b->[1] }
1090           map { [ $_, rand ] } @list;
1091
1092       The new alignment is not as nice as the input, but this is an improvement.
1093       Thanks to Yves Orton for this suggestion.
1094
1095      -modified indentation logic so that a line with leading opening paren,
1096      brace, or square bracket will never have less indentation than the
1097      line with the corresponding opening token.  Here's a simple example:
1098
1099         OLD:
1100             $mw->Button(
1101                 -text    => "New Document",
1102                 -command => \&new_document
1103               )->pack(
1104                 -side   => 'bottom',
1105                 -anchor => 'e'
1106             );
1107
1108         Note how the closing ');' is lined up with the first line, even
1109         though it closes a paren in the 'pack' line.  That seems wrong.
1110  
1111         NEW:
1112             $mw->Button(
1113                 -text    => "New Document",
1114                 -command => \&new_document
1115               )->pack(
1116                 -side   => 'bottom',
1117                 -anchor => 'e'
1118               );
1119
1120        This seems nicer: you can up-arrow with an editor and arrive at the
1121        opening 'pack' line.
1122  
1123      -corrected minor glitch in which cuddled else (-ce) did not get applied
1124      to an 'unless' block, which should look like this:
1125
1126             unless ($test) {
1127
1128             } else {
1129
1130             }
1131
1132       Thanks to Jeremy Mates for reporting this.
1133
1134      -The man page has been reorganized to parameters easier to find.
1135  
1136      -Added check for multiple definitions of same subroutine.  It is easy
1137       to introduce this problem when cutting and pasting. Perl does not
1138       complain about it, but it can lead to disaster.
1139
1140      -The command -pro=filename  or -profile=filename may be used to specify a
1141       configuration file which will override the default name of .perltidyrc.
1142       There must not be a space on either side of the '=' sign.  I needed
1143       this to be able to easily test perltidy with a variety of different
1144       configuration files.
1145
1146      -Side comment alignment has been improved somewhat across frequent level
1147       changes, as in short if/else blocks.  Thanks to Wolfgang Weisselberg 
1148       for pointing out this problem.  For example:
1149     
1150         OLD:
1151         if ( ref $self ) {    # Called as a method
1152             $format = shift;
1153         }
1154         else {    # Regular procedure call
1155             $format = $self;
1156             undef $self;
1157         }
1158
1159         NEW:
1160         if ( ref $self ) {    # Called as a method
1161             $format = shift;
1162         }
1163         else {                # Regular procedure call
1164             $format = $self;
1165             undef $self;
1166         }
1167
1168      -New command -ssc (--static-side-comment) and related command allows
1169       side comments to be spaced close to preceding character.  This is
1170       useful for displaying commented code as side comments.
1171
1172      -New command -csc (--closing-side-comment) and several related
1173       commands allow comments to be added to (and deleted from) any or all
1174       closing block braces.  This can be useful if you have to maintain large
1175       programs, especially those that you didn't write.  See updated man page.
1176       Thanks to Peter Masiar for this suggestion.  For a simple example:
1177
1178             perltidy -csc
1179
1180             sub foo {
1181                 if ( !defined( $_[0] ) ) {
1182                     print("Hello, World\n");
1183                 }
1184                 else {
1185                     print( $_[0], "\n" );
1186                 }
1187             } ## end sub foo
1188
1189       This added '## end sub foo' to the closing brace.  
1190       To remove it, perltidy -ncsc.
1191
1192      -New commands -ola, for outdenting labels, and -okw, for outdenting
1193       selected control keywords, were implemented.  See the perltidy man
1194       page for details.  Thanks to Peter Masiar for this suggestion.
1195
1196      -Hanging side comment change: a comment will not be considered to be a
1197       hanging side comment if there is no leading whitespace on the line.
1198       This should improve the reliability of identifying hanging side comments.
1199       Thanks to Peter Masiar for this suggestion.
1200
1201      -Two new commands for outdenting, -olq (outdent-long-quotes) and -olc
1202       (outdent-long-comments), have been added.  The original -oll
1203       (outdent-long-lines) remains, and now is an abbreviation for -olq and -olc.
1204       The new default is just -olq.  This was necessary to avoid inconsistency with
1205       the new static block comment option.
1206
1207      -Static block comments:  to provide a way to display commented code
1208       better, the convention is used that comments with a leading '##' should
1209       not be formatted as usual.  Please see '-sbc' (or '--static-block-comment')
1210       for documentation.  It can be deactivated with with -nsbc, but
1211       should not normally be necessary. Thanks to Peter Masiar for this 
1212       suggestion.
1213
1214      -Two changes were made to help show structure of complex lists:
1215       (1) breakpoints are forced after every ',' in a list where any of
1216       the list items spans multiple lines, and
1217       (2) List items which span multiple lines now get continuation indentation.
1218
1219       The following example illustrates both of these points.  Many thanks to
1220       Wolfgang Weisselberg for this snippet and a discussion of it; this is a
1221       significant formatting improvement. Note how it is easier to see the call
1222       parameters in the NEW version:
1223
1224         OLD:
1225         assert( __LINE__, ( not defined $check )
1226             or ref $check
1227             or $check eq "new"
1228             or $check eq "old", "Error in parameters",
1229             defined $old_new ? ( ref $old_new ? ref $old_new : $old_new ) : "undef",
1230             defined $db_new  ? ( ref $db_new  ? ref $db_new  : $db_new )  : "undef",
1231             defined $old_db ? ( ref $old_db ? ref $old_db : $old_db ) : "undef" );
1232
1233         NEW: 
1234         assert(
1235             __LINE__,
1236             ( not defined $check )
1237               or ref $check
1238               or $check eq "new"
1239               or $check eq "old",
1240             "Error in parameters",
1241             defined $old_new ? ( ref $old_new ? ref $old_new : $old_new ) : "undef",
1242             defined $db_new  ? ( ref $db_new  ? ref $db_new  : $db_new )  : "undef",
1243             defined $old_db  ? ( ref $old_db  ? ref $old_db  : $old_db )  : "undef"
1244         );
1245
1246         Another example shows how this helps displaying lists:
1247
1248         OLD:
1249         %{ $self->{COMPONENTS} } = (
1250             fname =>
1251             { type => 'name', adj => 'yes', font => 'Helvetica', 'index' => 0 },
1252             street =>
1253             { type => 'road', adj => 'yes', font => 'Helvetica', 'index' => 2 },
1254         );
1255
1256         The structure is clearer with the added indentation:
1257     
1258         NEW:
1259         %{ $self->{COMPONENTS} } = (
1260             fname =>
1261               { type => 'name', adj => 'yes', font => 'Helvetica', 'index' => 0 },
1262             street =>
1263               { type => 'road', adj => 'yes', font => 'Helvetica', 'index' => 2 },
1264         );
1265
1266         -The structure of nested logical expressions is now displayed better.
1267         Thanks to Wolfgang Weisselberg for helpful discussions.  For example,
1268         note how the status of the final 'or' is displayed in the following:
1269
1270         OLD:
1271         return ( !null($op)
1272               and null( $op->sibling )
1273               and $op->ppaddr eq "pp_null"
1274               and class($op) eq "UNOP"
1275               and ( ( $op->first->ppaddr =~ /^pp_(and|or)$/
1276                 and $op->first->first->sibling->ppaddr eq "pp_lineseq" )
1277                 or ( $op->first->ppaddr eq "pp_lineseq"
1278                     and not null $op->first->first->sibling
1279                     and $op->first->first->sibling->ppaddr eq "pp_unstack" ) ) );
1280
1281         NEW:
1282         return (
1283             !null($op)
1284               and null( $op->sibling )
1285               and $op->ppaddr eq "pp_null"
1286               and class($op) eq "UNOP"
1287               and (
1288                 (
1289                     $op->first->ppaddr =~ /^pp_(and|or)$/
1290                     and $op->first->first->sibling->ppaddr eq "pp_lineseq"
1291                 )
1292                 or ( $op->first->ppaddr eq "pp_lineseq"
1293                     and not null $op->first->first->sibling
1294                     and $op->first->first->sibling->ppaddr eq "pp_unstack" )
1295               )
1296         );
1297
1298        -A break will always be put before a list item containing a comma-arrow.
1299        This will improve formatting of mixed lists of this form:
1300
1301             OLD:
1302             $c->create(
1303                 'text', 225, 20, -text => 'A Simple Plot',
1304                 -font => $font,
1305                 -fill => 'brown'
1306             );
1307
1308             NEW:
1309             $c->create(
1310                 'text', 225, 20,
1311                 -text => 'A Simple Plot',
1312                 -font => $font,
1313                 -fill => 'brown'
1314             );
1315
1316       -For convenience, the command -dac (--delete-all-comments) now also
1317       deletes pod.  Likewise, -tac (--tee-all-comments) now also sends pod
1318       to a '.TEE' file.  Complete control over the treatment of pod and
1319       comments is still possible, as described in the updated help message 
1320       and man page.
1321
1322       -The logic which breaks open 'containers' has been rewritten to be completely
1323       symmetric in the following sense: if a line break is placed after an opening
1324       {, [, or (, then a break will be placed before the corresponding closing
1325       token.  Thus, a container either remains closed or is completely cracked
1326       open.
1327
1328       -Improved indentation of parenthesized lists.  For example, 
1329
1330                 OLD:
1331                 $GPSCompCourse =
1332                   int(
1333                   atan2( $GPSTempCompLong - $GPSLongitude,
1334                   $GPSLatitude - $GPSTempCompLat ) * 180 / 3.14159265 );
1335
1336                 NEW:
1337                 $GPSCompCourse = int(
1338                     atan2(
1339                         $GPSTempCompLong - $GPSLongitude,
1340                         $GPSLatitude - $GPSTempCompLat
1341                       ) * 180 / 3.14159265
1342                 );
1343
1344        Further improvements will be made in future releases.
1345
1346       -Some improvements were made in formatting small lists.
1347
1348       -Correspondence between Input and Output line numbers reported in a 
1349        .LOG file should now be exact.  They were sometimes off due to the size
1350        of intermediate buffers.
1351
1352       -Corrected minor tokenization error in which a ';' in a foreach loop
1353        control was tokenized as a statement termination, which forced a 
1354        line break:
1355
1356             OLD:
1357             foreach ( $i = 0;
1358                 $i <= 10;
1359                 $i += 2
1360               )
1361             {
1362                 print "$i ";
1363             }
1364
1365             NEW:
1366             foreach ( $i = 0 ; $i <= 10 ; $i += 2 ) {
1367                 print "$i ";
1368             }
1369
1370       -Corrected a problem with reading config files, in which quote marks were not
1371        stripped.  As a result, something like -wba="&& . || " would have the leading
1372        quote attached to the && and not work correctly.  A workaround for older
1373        versions is to place a space around all tokens within the quotes, like this:
1374        -wba=" && . || "
1375
1376       -Removed any existing space between a label and its ':'
1377         OLD    : { }
1378         NEW: { }
1379        This was necessary because the label and its colon are a single token.
1380
1381       -Corrected tokenization error for the following (highly non-recommended) 
1382        construct:
1383         $user = @vars[1] / 100;
1384  
1385       -Resolved cause of a difference between perltidy under perl v5.6.1 and
1386       5.005_03; the problem was different behavior of \G regex position
1387       marker(!)
1388
1389   2001 10 20
1390      -Corrected a bug in which a break was not being made after a full-line
1391      comment within a short eval/sort/map/grep block.  A flag was not being
1392      zeroed.  The syntax error check catches this.  Here is a snippet which
1393      illustrates the bug:
1394
1395             eval {
1396                 #open Socket to Dispatcher
1397                 $sock = &OpenSocket;
1398             };
1399
1400      The formatter mistakenly thought that it had found the following 
1401      one-line block:
1402  
1403             eval {#open Socket to Dispatcher$sock = &OpenSocket; };
1404
1405      The patch fixes this. Many thanks to Henry Story for reporting this bug.
1406
1407      -Changes were made to help diagnose and resolve problems in a
1408      .perltidyrc file: 
1409        (1) processing of command parameters has been into two separate
1410        batches so that any errors in a .perltidyrc file can be localized.  
1411        (2) commands --help, --version, and as many of the --dump-xxx
1412        commands are handled immediately, without any command line processing
1413        at all.  
1414        (3) Perltidy will ignore any commands in the .perltidyrc file which
1415        cause immediate exit.  These are:  -h -v -ddf -dln -dop -dsn -dtt
1416        -dwls -dwrs -ss.  Thanks to Wolfgang Weisselberg for helpful
1417        suggestions regarding these updates.
1418
1419      -Syntax check has been reinstated as default for MSWin32 systems.  This
1420      way Windows 2000 users will get syntax check by default, which seems
1421      like a better idea, since the number of Win 95/98 systems will be
1422      decreasing over time.  Documentation revised to warn Windows 95/98
1423      users about the problem with empty '&1'.  Too bad these systems
1424      all report themselves as MSWin32.
1425
1426   2001 10 16
1427      -Fixed tokenization error in which a method call of the form
1428
1429         Module::->new();
1430  
1431       got a space before the '::' like this:
1432
1433         Module ::->new();
1434
1435       Thanks to David Holden for reporting this.
1436  
1437      -Added -html control over pod text, using a new abbreviation 'pd'.  See
1438      updated perl2web man page. The default is to use the color of a comment,
1439      but italicized.  Old .css style sheets will need a new line for
1440      .pd to use this.  The old color was the color of a string, and there
1441      was no control.  
1442  
1443      -.css lines are now printed in sorted order.
1444
1445      -Fixed interpolation problem where html files had '$input_file' as title
1446      instead of actual input file name.  Thanks to Simon Perreault for finding
1447      this and sending a patch, and also to Tobias Weber.
1448
1449      -Breaks will now have the ':' placed at the start of a line, 
1450      one per line by default because this shows logical structure
1451      more clearly. This coding has been completely redone. Some 
1452      examples of new ?/: formatting:
1453
1454            OLD:
1455                 wantarray ? map( $dir::cwd->lookup($_)->path, @_ ) :
1456                   $dir::cwd->lookup( $_[0] )->path;
1457
1458            NEW:
1459                 wantarray 
1460                   ? map( $dir::cwd->lookup($_)->path, @_ )
1461                   : $dir::cwd->lookup( $_[0] )->path;
1462
1463            OLD:
1464                     $a = ( $b > 0 ) ? {
1465                         a => 1,
1466                         b => 2
1467                     } : { a => 6, b => 8 };
1468
1469            NEW:
1470                     $a = ( $b > 0 )
1471                       ? {
1472                         a => 1,
1473                         b => 2
1474                       }
1475                       : { a => 6, b => 8 };
1476
1477         OLD: (-gnu):
1478         $self->note($self->{skip} ? "Hunk #$self->{hunk} ignored at 1.\n" :
1479                     "Hunk #$self->{hunk} failed--$@");
1480
1481         NEW: (-gnu):
1482         $self->note($self->{skip} 
1483                     ? "Hunk #$self->{hunk} ignored at 1.\n"
1484                     : "Hunk #$self->{hunk} failed--$@");
1485
1486         OLD:
1487             $which_search =
1488               $opts{"t"} ? 'title'   :
1489               $opts{"s"} ? 'subject' : $opts{"a"} ? 'author' : 'title';
1490
1491         NEW:
1492             $which_search =
1493               $opts{"t"} ? 'title'
1494               : $opts{"s"} ? 'subject'
1495               : $opts{"a"} ? 'author'
1496               : 'title';
1497  
1498      You can use -wba=':' to recover the previous default which placed ':'
1499      at the end of a line.  Thanks to Michael Cartmell for helpful
1500      discussions and examples.  
1501
1502      -Tokenizer updated to do syntax checking for matched ?/: pairs.  Also,
1503      the tokenizer now outputs a unique serial number for every balanced
1504      pair of brace types and ?/: pairs.  This greatly simplifies the
1505      formatter.
1506
1507      -Long lines with repeated 'and', 'or', '&&', '||'  will now have
1508      one such item per line.  For example:
1509
1510         OLD:
1511             if ( $opt_d || $opt_m || $opt_p || $opt_t || $opt_x
1512                 || ( -e $archive && $opt_r ) )
1513             {
1514                 ( $pAr, $pNames ) = readAr($archive);
1515             }
1516
1517         NEW:
1518             if ( $opt_d
1519                 || $opt_m
1520                 || $opt_p
1521                 || $opt_t
1522                 || $opt_x
1523                 || ( -e $archive && $opt_r ) )
1524             {
1525                 ( $pAr, $pNames ) = readAr($archive);
1526             }
1527
1528        OLD:
1529             if ( $vp->{X0} + 4 <= $x && $vp->{X0} + $vp->{W} - 4 >= $x
1530                 && $vp->{Y0} + 4 <= $y && $vp->{Y0} + $vp->{H} - 4 >= $y ) 
1531
1532        NEW:
1533             if ( $vp->{X0} + 4 <= $x
1534                 && $vp->{X0} + $vp->{W} - 4 >= $x
1535                 && $vp->{Y0} + 4 <= $y
1536                 && $vp->{Y0} + $vp->{H} - 4 >= $y )
1537
1538      -Long lines with multiple concatenated tokens will have concatenated
1539      terms (see below) placed one per line, except for short items.  For
1540      example:
1541
1542        OLD:
1543             $report .=
1544               "Device type:" . $ib->family . "  ID:" . $ib->serial . "  CRC:"
1545               . $ib->crc . ": " . $ib->model() . "\n";
1546
1547        NEW:
1548             $report .= "Device type:"
1549               . $ib->family . "  ID:"
1550               . $ib->serial . "  CRC:"
1551               . $ib->model()
1552               . $ib->crc . ": " . "\n";
1553
1554      NOTE: at present 'short' means 8 characters or less.  There is a
1555      tentative flag to change this (-scl), but it is undocumented and
1556      is likely to be changed or removed later, so only use it for testing.  
1557      In the above example, the tokens "  ID:", "  CRC:", and "\n" are below
1558      this limit.  
1559
1560      -If a line which is short enough to fit on a single line was
1561      nevertheless broken in the input file at a 'good' location (see below), 
1562      perltidy will try to retain a break.  For example, the following line
1563      will be formatted as:
1564  
1565         open SUM, "<$file"
1566           or die "Cannot open $file ($!)";
1567  
1568      if it was broken in the input file, and like this if not:
1569
1570         open SUM, "<$file" or die "Cannot open $file ($!)";
1571
1572      GOOD: 'good' location means before 'and','or','if','unless','&&','||'
1573
1574      The reason perltidy does not just always break at these points is that if
1575      there are multiple, similar statements, this would preclude alignment.  So
1576      rather than check for this, perltidy just tries to follow the input style,
1577      in the hopes that the author made a good choice. Here is an example where 
1578      we might not want to break before each 'if':
1579
1580         ($Locale, @Locale) = ($English, @English) if (@English > @Locale);
1581         ($Locale, @Locale) = ($German,  @German)  if (@German > @Locale);
1582         ($Locale, @Locale) = ($French,  @French)  if (@French > @Locale);
1583         ($Locale, @Locale) = ($Spanish, @Spanish) if (@Spanish > @Locale);
1584
1585      -Added wildcard file expansion for systems with shells which lack this.
1586      Now 'perltidy *.pl' should work under MSDOS/Windows.  Thanks to Hugh Myers 
1587      for suggesting this.  This uses builtin glob() for now; I may change that.
1588
1589      -Added new flag -sbl which, if specified, overrides the value of -bl
1590      for opening sub braces.  This allows formatting of this type:
1591
1592      perltidy -sbl 
1593
1594      sub foo
1595      {
1596         if (!defined($_[0])) {
1597             print("Hello, World\n");
1598         }
1599         else {
1600             print($_[0], "\n");
1601         }
1602      }
1603      Requested by Don Alexander.
1604
1605      -Fixed minor parsing error which prevented a space after a $$ variable
1606      (pid) in some cases.  Thanks to Michael Cartmell for noting this.
1607      For example, 
1608        old: $$< 700 
1609        new: $$ < 700
1610
1611      -Improved line break choices 'and' and 'or' to display logic better.
1612      For example:
1613
1614         OLD:
1615             exists $self->{'build_dir'} and push @e,
1616               "Unwrapped into directory $self->{'build_dir'}";
1617
1618         NEW:
1619             exists $self->{'build_dir'}
1620               and push @e, "Unwrapped into directory $self->{'build_dir'}";
1621
1622      -Fixed error of multiple use of abbreviatioin '-dsc'.  -dsc remains 
1623      abbreviation for delete-side-comments; -dsm is new abbreviation for 
1624      delete-semicolons.
1625
1626      -Corrected and updated 'usage' help routine.  Thanks to Slaven Rezic for 
1627      noting an error.
1628
1629      -The default for Windows is, for now, not to do a 'perl -c' syntax
1630      check (but -syn will activate it).  This is because of problems with
1631      command.com.  James Freeman sent me a patch which tries to get around
1632      the problems, and it works in many cases, but testing revealed several
1633      issues that still need to be resolved.  So for now, the default is no
1634      syntax check for Windows.
1635
1636      -I added a -T flag when doing perl -c syntax check.
1637      This is because I test it on a large number of scripts from sources
1638      unknown, and who knows what might be hidden in initialization blocks?
1639      Also, deactivated the syntax check if perltidy is run as root.  As a
1640      benign example, running the previous version of perltidy on the
1641      following file would cause it to disappear:
1642
1643             BEGIN{
1644                     print "Bye, bye baby!\n";
1645                     unlink $0;
1646             }
1647         
1648      The new version will not let that happen.
1649
1650      -I am contemplating (but have not yet implemented) making '-lp' the
1651      default indentation, because it is stable now and may be closer to how
1652      perl is commonly formatted.  This could be in the next release.  The
1653      reason that '-lp' was not the original default is that the coding for
1654      it was complex and not ready for the initial release of perltidy.  If
1655      anyone has any strong feelings about this, I'd like to hear.  The
1656      current default could always be recovered with the '-nlp' flag.  
1657
1658   2001 09 03
1659      -html updates:
1660          - sub definition names are now specially colored, red by default.  
1661            The letter 'm' is used to identify them.
1662          - keyword 'sub' now has color of other keywords.
1663          - restored html keyword color to __END__ and __DATA__, which was 
1664            accidentally removed in the previous version.
1665
1666      -A new -se (--standard-error-output) flag has been implemented and
1667      documented which causes all errors to be written to standard output
1668      instead of a .ERR file.
1669
1670      -A new -w (--warning-output) flag has been implemented and documented
1671       which causes perltidy to output certain non-critical messages to the
1672       error output file, .ERR.  These include complaints about pod usage,
1673       for example.  The default is to not include these.
1674
1675       NOTE: This replaces an undocumented -w=0 or --warning-level flag
1676       which was tentatively introduced in the previous version to avoid some
1677       unwanted messages.  The new default is the same as the old -w=0, so
1678       that is no longer needed. 
1679
1680       -Improved syntax checking and corrected tokenization of functions such
1681       as rand, srand, sqrt, ...  These can accept either an operator or a term
1682       to their right.  This has been corrected.
1683  
1684      -Corrected tokenization of semicolon: testing of the previous update showed 
1685      that the semicolon in the following statement was being mis-tokenized.  That
1686      did no harm, other than adding an extra blank space, but has been corrected.
1687
1688               for (sort {strcoll($a,$b);} keys %investments) {
1689                  ...
1690               }
1691
1692      -New syntax check: after wasting 5 minutes trying to resolve a syntax
1693       error in which I had an extra terminal ';' in a complex for (;;) statement, 
1694       I spent a few more minutes adding a check for this in perltidy so it won't
1695       happen again.
1696
1697      -The behavior of --break-before-subs (-bbs) and --break-before-blocks
1698      (-bbb) has been modified.  Also, a new control parameter,
1699      --long-block-line-count=n (-lbl=n) has been introduced to give more
1700      control on -bbb.  This was previously a hardwired value.  The reason
1701      for the change is to reduce the number of unwanted blank lines that
1702      perltidy introduces, and make it less erratic.  It's annoying to remove
1703      an unwanted blank line and have perltidy put it back.  The goal is to
1704      be able to sprinkle a few blank lines in that dense script you
1705      inherited from Bubba.  I did a lot of experimenting with different
1706      schemes for introducing blank lines before and after code blocks, and
1707      decided that there is no really good way to do it.  But I think the new
1708      scheme is an improvement.  You can always deactivate this with -nbbb.
1709      I've been meaning to work on this; thanks to Erik Thaysen for bringing
1710      it to my attention.
1711
1712      -The .LOG file is seldom needed, and I get tired of deleting them, so
1713       they will now only be automatically saved if perltidy thinks that it
1714       made an error, which is almost never.  You can still force the logfile
1715       to be saved with -log or -g.
1716
1717      -Improved method for computing number of columns in a table.  The old
1718      method always tried for an even number.  The new method allows odd
1719      numbers when it is obvious that a list is not a hash initialization
1720      list.
1721
1722        old: my (
1723                  $name,       $xsargs, $parobjs, $optypes,
1724                  $hasp2child, $pmcode, $hdrcode, $inplacecode,
1725                  $globalnew,  $callcopy
1726               )
1727               = @_;
1728
1729        new: my (
1730                  $name,   $xsargs,  $parobjs,     $optypes,   $hasp2child,
1731                  $pmcode, $hdrcode, $inplacecode, $globalnew, $callcopy
1732               )
1733               = @_;
1734
1735      -I fiddled with the list threshold adjustment, and some small lists
1736      look better now.  Here is the change for one of the lists in test file
1737      'sparse.t':
1738      old:
1739        %units =
1740          ("in", "in", "pt", "pt", "pc", "pi", "mm", "mm", "cm", "cm", "\\hsize", "%",
1741            "\\vsize", "%", "\\textwidth", "%", "\\textheight", "%");
1742
1743      new:
1744        %units = (
1745                   "in",      "in", "pt",          "pt", "pc",           "pi",
1746                   "mm",      "mm", "cm",          "cm", "\\hsize",      "%",
1747                   "\\vsize", "%",  "\\textwidth", "%",  "\\textheight", "%"
1748                   );
1749
1750      -Improved -lp formatting at '=' sign.  A break was always being added after
1751      the '=' sign in a statement such as this, (to be sure there was enough room
1752      for the parameters):
1753
1754      old: my $fee =
1755             CalcReserveFee(
1756                             $env,          $borrnum,
1757                             $biblionumber, $constraint,
1758                             $bibitems
1759                             );
1760  
1761      The updated version doesn't do this unless the space is really needed:
1762
1763      new: my $fee = CalcReserveFee(
1764                                    $env,          $borrnum,
1765                                    $biblionumber, $constraint,
1766                                    $bibitems
1767                                    );
1768
1769      -I updated the tokenizer to allow $#+ and $#-, which seem to be new to
1770      Perl 5.6.  Some experimenting with a recent version of Perl indicated
1771      that it allows these non-alphanumeric '$#' array maximum index
1772      varaibles: $#: $#- $#+ so I updated the parser accordingly.  Only $#:
1773      seems to be valid in older versions of Perl.
1774
1775      -Fixed a rare formatting problem with -lp (and -gnu) which caused
1776      excessive indentation.
1777
1778      -Many additional syntax checks have been added.
1779
1780      -Revised method for testing here-doc target strings; the following
1781      was causing trouble with a regex test because of the '*' characters:
1782       print <<"*EOF*";
1783       bla bla
1784       *EOF*
1785      Perl seems to allow almost anything to be a here doc target, so an
1786      exact string comparison is now used.
1787
1788      -Made update to allow underscores in binary numbers, like '0b1100_0000'.
1789
1790      -Corrected problem with scanning certain module names; a blank space was 
1791      being inserted after 'warnings' in the following:
1792         use warnings::register;
1793      The problem was that warnings (and a couple of other key modules) were 
1794      being tokenized as keywords.  They should have just been identifiers.
1795
1796      -Corrected tokenization of indirect objects after sort, system, and exec,
1797      after testing produced an incorrect error message for the following
1798      line of code:
1799         print sort $sortsubref @list;
1800
1801      -Corrected minor problem where a line after a format had unwanted
1802      extra continuation indentation.  
1803
1804      -Delete-block-comments (and -dac) now retain any leading hash-bang line
1805
1806      -Update for -lp (and -gnu) to not align the leading '=' of a list
1807      with a previous '=', since this interferes with alignment of parameters.
1808
1809       old:  my $hireDay = new Date;
1810             my $self    = {
1811                          firstName => undef,
1812                          lastName  => undef,
1813                          hireDay   => $hireDay
1814                          };
1815     
1816       new:  my $hireDay = new Date;
1817             my $self = {
1818                          firstName => undef,
1819                          lastName  => undef,
1820                          hireDay   => $hireDay
1821                          };
1822
1823      -Modifications made to display tables more compactly when possible,
1824       without adding lines. For example,
1825       old:
1826                     '1', "I", '2', "II", '3', "III", '4', "IV",
1827                     '5', "V", '6', "VI", '7', "VII", '8', "VIII",
1828                     '9', "IX"
1829       new:
1830                     '1', "I",   '2', "II",   '3', "III",
1831                     '4', "IV",  '5', "V",    '6', "VI",
1832                     '7', "VII", '8', "VIII", '9', "IX"
1833
1834      -Corrected minor bug in which -pt=2 did not keep the right paren tight
1835      around a '++' or '--' token, like this:
1836
1837                 for ($i = 0 ; $i < length $key ; $i++ )
1838
1839      The formatting for this should be, and now is: 
1840
1841                 for ($i = 0 ; $i < length $key ; $i++)
1842
1843      Thanks to Erik Thaysen for noting this.
1844
1845      -Discovered a new bug involving here-docs during testing!  See BUGS.html.  
1846
1847      -Finally fixed parsing of subroutine attributes (A Perl 5.6 feature).
1848      However, the attributes and prototypes must still be on the same line
1849      as the sub name.
1850
1851   2001 07 31
1852      -Corrected minor, uncommon bug found during routine testing, in which a
1853      blank got inserted between a function name and its opening paren after
1854      a file test operator, but only in the case that the function had not
1855      been previously seen.  Perl uses the existance (or lack thereof) of 
1856      the blank to guess if it is a function call.  That is,
1857         if (-l pid_filename()) {
1858      became
1859         if (-l pid_filename ()) {
1860      which is a syntax error if pid_filename has not been seen by perl.
1861
1862      -If the AutoLoader module is used, perltidy will continue formatting
1863      code after seeing an __END__ line.  Use -nlal to deactivate this feature.  
1864      Likewise, if the SelfLoader module is used, perltidy will continue 
1865      formatting code after seeing a __DATA__ line.  Use -nlsl to
1866      deactivate this feature.  Thanks to Slaven Rezic for this suggestion.
1867
1868      -pod text after __END__ and __DATA__ is now identified by perltidy
1869      so that -dp works correctly.  Thanks to Slaven Rezic for this suggestion.
1870
1871      -The first $VERSION line which might be eval'd by MakeMaker
1872      is now passed through unchanged.  Use -npvl to deactivate this feature.
1873      Thanks to Manfred Winter for this suggestion.
1874
1875      -Improved indentation of nested parenthesized expressions.  Tests have
1876      given favorable results.  Thanks to Wolfgang Weisselberg for helpful
1877      examples.
1878
1879   2001 07 23
1880      -Fixed a very rare problem in which an unwanted semicolon was inserted
1881      due to misidentification of anonymous hash reference curly as a code
1882      block curly.  (No instances of this have been reported; I discovered it
1883      during testing).  A workaround for older versions of perltidy is to use
1884      -nasc.
1885
1886      -Added -icb (-indent-closing-brace) parameter to indent a brace which
1887      terminates a code block to the same level as the previous line.
1888      Suggested by Andrew Cutler.  For example, 
1889
1890             if ($task) {
1891                 yyy();
1892                 }    # -icb
1893             else {
1894                 zzz();
1895                 }
1896
1897      -Rewrote error message triggered by an unknown bareword in a print or
1898      printf filehandle position, and added flag -w=0 to prevent issuing this
1899      error message.  Suggested by Byron Jones.
1900
1901      -Added modification to align a one-line 'if' block with similar
1902      following 'elsif' one-line blocks, like this:
1903           if    ( $something eq "simple" )  { &handle_simple }
1904           elsif ( $something eq "hard" )    { &handle_hard }
1905      (Suggested by  Wolfgang Weisselberg).
1906
1907   2001 07 02
1908      -Eliminated all constants with leading underscores because perl 5.005_03
1909      does not support that.  For example, _SPACES changed to XX_SPACES.
1910      Thanks to kromJx for this update.
1911
1912   2001 07 01
1913      -the directory of test files has been moved to a separate distribution
1914      file because it is getting large but is of little interest to most users.
1915      For the current distribution:
1916        perltidy-20010701.tgz        contains the source and docs for perltidy
1917        perltidy-20010701-test.tgz   contains the test files
1918
1919      -fixed bug where temporary file perltidy.TMPI was not being deleted 
1920      when input was from stdin.
1921
1922      -adjusted line break logic to not break after closing brace of an
1923      eval block (suggested by Boris Zentner).
1924
1925      -added flag -gnu (--gnu-style) to give an approximation to the GNU
1926      style as sometimes applied to perl.  The programming style in GNU
1927      'automake' was used as a guide in setting the parameters; these
1928      parameters will probably be adjusted over time.
1929
1930      -an empty code block now has one space for emphasis:
1931        if ( $cmd eq "bg_untested" ) {}    # old
1932        if ( $cmd eq "bg_untested" ) { }   # new
1933      If this bothers anyone, we could create a parameter.
1934
1935      -the -bt (--brace-tightness) parameter has been split into two
1936      parameters to give more control. -bt now applies only to non-BLOCK
1937      braces, while a new parameter -bbt (block-brace-tightness) applies to
1938      curly braces which contain code BLOCKS. The default value is -bbt=0.
1939
1940      -added flag -icp (--indent-closing-paren) which leaves a statment
1941      termination of the form );, };, or ]; indented with the same
1942      indentation as the previous line.  For example,
1943
1944         @month_of_year = (          # default, or -nicp
1945             'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct',
1946             'Nov', 'Dec'
1947         );
1948
1949         @month_of_year = (          # -icp
1950             'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct',
1951             'Nov', 'Dec'
1952             );
1953
1954      -Vertical alignment updated to synchronize with tokens &&, ||,
1955      and, or, if, unless.  Allowable space before forcing
1956      resynchronization has been increased.  (Suggested by  Wolfgang
1957      Weisselberg).
1958
1959      -html corrected to use -nohtml-bold-xxxxxxx or -nhbx to negate bold,
1960      and likewise -nohtml-italic-xxxxxxx or -nhbi to negate italic.  There
1961      was no way to negate these previously.  html documentation updated and
1962      corrected.  (Suggested by  Wolfgang Weisselberg).
1963
1964      -Some modifications have been made which improve the -lp formatting in
1965      a few cases.
1966
1967      -Perltidy now retains or creates a blank line after an =cut to keep
1968      podchecker happy (Suggested by Manfred H. Winter).  This appears to be
1969      a glitch in podchecker, but it was annoying.
1970
1971   2001 06 17
1972      -Added -bli flag to give continuation indentation to braces, like this
1973
1974             if ($bli_flag)
1975               {
1976                 extra_indentation();
1977               }
1978
1979      -Corrected an error with the tab (-t) option which caused the last line
1980      of a multi-line quote to receive a leading tab.  This error was in
1981      version 2001 06 08  but not 2001 04 06.  If you formatted a script
1982      with -t with this version, please check it by running once with the
1983      -chk flag and perltidy will scan for this possible error.
1984
1985      -Corrected an invalid pattern (\R should have been just R), changed
1986      $^W =1 to BEGIN {$^W=1} to use warnings in compile phase, and corrected
1987      several unnecessary 'my' declarations. Many thanks to Wolfgang Weisselberg,
1988      2001-06-12, for catching these errors.
1989  
1990      -A '-bar' flag has been added to require braces to always be on the
1991      right, even for multi-line if and foreach statements.  For example,
1992      the default formatting of a long if statement would be:
1993
1994             if ($bigwasteofspace1 && $bigwasteofspace2
1995               || $bigwasteofspace3 && $bigwasteofspace4)
1996             {
1997                 bigwastoftime();
1998             }
1999
2000      With -bar, the formatting is:
2001
2002             if ($bigwasteofspace1 && $bigwasteofspace2
2003               || $bigwasteofspace3 && $bigwasteofspace4) {
2004                 bigwastoftime();
2005             }
2006      Suggested by Eli Fidler 2001-06-11.
2007
2008      -Uploaded perltidy to sourceforge cvs 2001-06-10.
2009
2010      -An '-lp' flag (--line-up-parentheses) has been added which causes lists
2011      to be indented with extra indentation in the manner sometimes
2012      associated with emacs or the GNU suggestions.  Thanks to Ian Stuart for
2013      this suggestion and for extensive help in testing it. 
2014
2015      -Subroutine call parameter lists are now formatted as other lists.
2016      This should improve formatting of tables being passed via subroutine
2017      calls.  This will also cause full indentation ('-i=n, default n= 4) of
2018      continued parameter list lines rather than just the number of spaces
2019      given with -ci=n, default n=2.
2020  
2021      -Added support for hanging side comments.  Perltidy identifies a hanging
2022      side comment as a comment immediately following a line with a side
2023      comment or another hanging side comment.  This should work in most
2024      cases.  It can be deactivated with --no-hanging-side-comments (-nhsc).
2025      The manual has been updated to discuss this.  Suggested by Brad
2026      Eisenberg some time ago, and finally implemented.
2027
2028   2001 06 08
2029      -fixed problem with parsing command parameters containing quoted
2030      strings in .perltidyrc files. (Reported by Roger Espel Llima 2001-06-07).
2031
2032      -added two command line flags, --want-break-after and 
2033      --want-break-before, which allow changing whether perltidy
2034      breaks lines before or after any operators.  Please see the revised 
2035      man pages for details.
2036
2037      -added system-wide configuration file capability.
2038      If perltidy does not find a .perltidyrc command line file in
2039      the current directory, nor in the home directory, it now looks
2040      for '/usr/local/etc/perltidyrc' and then for '/etc/perltidyrc'.
2041      (Suggested by Roger Espel Llima 2001-05-31).
2042
2043      -fixed problem in which spaces were trimmed from lines of a multi-line
2044      quote. (Reported by Roger Espel Llima 2001-05-30).  This is an 
2045      uncommon situation, but serious, because it could conceivably change
2046      the proper function of a script.
2047
2048      -fixed problem in which a semicolon was incorrectly added within 
2049      an anonymous hash.  (Reported by A.C. Yardley, 2001-5-23).
2050      (You would know if this happened, because perl would give a syntax
2051      error for the resulting script).
2052
2053      -fixed problem in which an incorrect error message was produced
2054       after a version number on a 'use' line, like this ( Reported 
2055       by Andres Kroonmaa, 2001-5-14):
2056
2057                   use CGI 2.42 qw(fatalsToBrowser);
2058
2059       Other than the extraneous error message, this bug was harmless.
2060
2061   2001 04 06
2062      -fixed serious bug in which the last line of some multi-line quotes or
2063       patterns was given continuation indentation spaces.  This may make
2064       a pattern incorrect unless it uses the /x modifier.  To find
2065       instances of this error in scripts which have been formatted with
2066       earlier versions of perltidy, run with the -chk flag, which has
2067       been added for this purpose (SLH, 2001-04-05).
2068
2069       ** So, please check previously formatted scripts by running with -chk
2070       at least once **
2071
2072      -continuation indentation has been reprogrammed to be hierarchical, 
2073       which improves deeply nested structures.
2074
2075      -fixed problem with undefined value in list formatting (reported by Michael
2076       Langner 2001-04-05)
2077
2078      -Switched to graphical display of nesting in .LOG files.  If an
2079       old format string was "(1 [0 {2", the new string is "{{(".  This
2080       is easier to read and also shows the order of nesting.
2081
2082      -added outdenting of cuddled paren structures, like  ")->pack(".
2083
2084      -added line break and outdenting of ')->' so that instead of
2085
2086             $mw->Label(
2087               -text   => "perltidy",
2088               -relief => 'ridge')->pack;
2089  
2090       the current default is:
2091
2092             $mw->Label(
2093               -text   => "perltidy",
2094               -relief => 'ridge'
2095             )->pack;
2096
2097       (requested by Michael Langner 2001-03-31; in the future this could 
2098       be controlled by a command-line parameter).
2099
2100      -revised list indentation logic, so that lists following an assignment
2101       operator get one full indentation level, rather than just continuation 
2102       indentation.  Also corrected some minor glitches in the continuation 
2103       indentation logic. 
2104
2105      -Fixed problem with unwanted continuation indentation after a blank line 
2106      (reported by Erik Thaysen 2001-03-28):
2107
2108      -minor update to avoid stranding a single '(' on one line
2109
2110   2001 03 28:
2111      -corrected serious error tokenizing filehandles, in which a sub call 
2112      after a print or printf, like this:
2113         print usage() and exit;
2114      became this:
2115         print usage () and exit;
2116      Unfortunately, this converts 'usage' to a filehandle.  To fix this, rerun
2117      perltidy; it will look for this situation and issue a warning. 
2118
2119      -fixed another cuddled-else formatting bug (Reported by Craig Bourne)
2120
2121      -added several diagnostic --dump routines
2122  
2123      -added token-level whitespace controls (suggested by Hans Ecke)
2124
2125   2001 03 23:
2126      -added support for special variables of the form ${^WANT_BITS}
2127
2128      -space added between scalar and left paren in 'for' and 'foreach' loops,
2129       (suggestion by Michael Cartmell):
2130
2131         for $i( 1 .. 20 )   # old
2132         for $i ( 1 .. 20 )   # new
2133
2134      -html now outputs cascading style sheets (thanks to suggestion from
2135       Hans Ecke)
2136
2137      -flags -o and -st now work with -html
2138
2139      -added missing -html documentation for comments (noted by Alex Izvorski)
2140
2141      -support for VMS added (thanks to Michael Cartmell for code patches and 
2142        testing)
2143
2144      -v-strings implemented (noted by Hans Ecke and Michael Cartmell; extensive
2145        testing by Michael Cartmell)
2146
2147      -fixed problem where operand may be empty at line 3970 
2148       (\b should be just b in lines 3970, 3973) (Thanks to Erik Thaysen, 
2149       Keith Marshall for bug reports)
2150
2151      -fixed -ce bug (cuddled else), where lines like '} else {' were indented
2152       (Thanks to Shawn Stepper and Rick Measham for reporting this)
2153
2154   2001 03 04:
2155      -fixed undefined value in line 153 (only worked with -I set)
2156      (Thanks to Mike Stok, Phantom of the Opcodes, Ian Ehrenwald, and others)
2157
2158      -fixed undefined value in line 1069 (filehandle problem with perl versions <
2159      5.6) (Thanks to Yuri Leikind, Mike Stok, Michael Holve, Jeff Kolber)
2160
2161   2001 03 03:
2162      -Initial announcement at freshmeat.net; started Change Log
2163      (Unfortunately this version was DOA, but it was fixed the next day)