"Fossies" - the Fresh Open Source Software Archive

Member "Perl-Tidy-20200110/docs/ChangeLog.html" (9 Jan 2020, 133915 Bytes) of package /linux/misc/Perl-Tidy-20200110.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "ChangeLog.html": 20191203_vs_20200110.

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