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