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