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