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