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