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