+ 2012 07 01
+ - Corrected problem introduced by using a chomp on scalar references, RT #77978
+
+ - Added support for Perl 5.14 package block syntax, RT #78114.
+
+ - A convergence test is made if three or more iterations are requested with
+ the -it=n parameter to avoid wasting computer time. Several hundred Mb of
+ code gleaned from the internet were searched with the results that:
+ - It is unusual for two iterations to be required unless a major
+ style change is being made.
+ - Only one case has been found where three iterations were required.
+ - No cases requiring four iterations have been found with this version.
+ For the previous version several cases where found the results could
+ oscillate between two semi-stable states. This version corrects this.
+
+ So if it is important that the code be converged it is okay to set -it=4
+ with this version and it will probably stop after the second iteration.
+
+ - Improved ability to identify and retain good line break points in the
+ input stream, such as at commas and equals. You can always tell
+ perltidy to ignore old breakpoints with -iob.
+
+ - Fixed glitch in which a terminal closing hash brace followed by semicolon
+ was not outdented back to the leading line depth like other closing
+ tokens. Thanks to Keith Neargarder for noting this.
+
+ OLD:
+ my ( $pre, $post ) = @{
+ {
+ "pp_anonlist" => [ "[", "]" ],
+ "pp_anonhash" => [ "{", "}" ]
+ }->{ $kid->ppaddr }
+ }; # terminal brace
+
+ NEW:
+ my ( $pre, $post ) = @{
+ {
+ "pp_anonlist" => [ "[", "]" ],
+ "pp_anonhash" => [ "{", "}" ]
+ }->{ $kid->ppaddr }
+ }; # terminal brace
+
+ - Removed extra indentation given to trailing 'if' and 'unless' clauses
+ without parentheses because this occasionally produced undesirable
+ results. This only applies where parens are not used after the if or
+ unless.
+
+ OLD:
+ return undef
+ unless my ( $who, $actions ) =
+ $clause =~ /^($who_re)((?:$action_re)+)$/o;
+
+ NEW:
+ return undef
+ unless my ( $who, $actions ) =
+ $clause =~ /^($who_re)((?:$action_re)+)$/o;
+
+ 2012 06 19
+ - Updated perltidy to handle all quote modifiers defined for perl 5 version 16.
+
+ - Side comment text in perltidyrc configuration files must now begin with
+ at least one space before the #. Thus:
+
+ OK:
+ -l=78 # Max line width is 78 cols
+ BAD:
+ -l=78# Max line width is 78 cols
+
+ This is probably true of almost all existing perltidyrc files,
+ but if you get an error message about bad parameters
+ involving a '#' the first time you run this version, please check the side
+ comments in your perltidyrc file, and add a space before the # if necessary.
+ You can quickly see the contents your perltidyrc file, if any, with the
+ command:
+
+ perltidy -dpro
+
+ The reason for this change is that some parameters naturally involve
+ the # symbol, and this can get interpreted as a side comment unless the
+ parameter is quoted. For example, to define -sphb=# it used to be necessary
+ to write
+ -sbcp='#'
+ to keep the # from becomming part of a comment. This was causing
+ trouble for new users. Now it can also be written without quotes:
+ -sbcp=#
+
+ - Fixed bug in processing some .perltidyrc files containing parameters with
+ an opening brace character, '{'. For example the following was
+ incorrectly processed:
+ --static-block-comment-prefix="^#{2,}[^\s#]"
+ Thanks to pdagosto.
+
+ - Added flag -boa (--break-at-old-attribute-breakpoints) which retains
+ any existing line breaks at attribute separation ':'. This is now the
+ default, use -nboa to deactivate. Thanks to Daphne Phister for the patch.
+ For example, given the following code, the line breaks at the ':'s will be
+ retained:
+
+ my @field
+ : field
+ : Default(1)
+ : Get('Name' => 'foo') : Set('Name');
+
+ whereas the previous version would have output a single line. If
+ the attributes are on a single line then they will remain on a single line.
+
+ - Added new flags --blank-lines-before-subs=n (-blbs=n) and
+ --blank-lines-before-packages=n (-blbp=n) to put n blank lines before
+ subs and packages. The old flag -bbs is now equivalent to -blbs=1 -blbp=1.
+ and -nbbs is equivalent to -blbs=0 -blbp=0. Requested by M. Schwern and
+ several others.
+
+ - Added feature -nsak='*' meaning no space between any keyword and opening
+ paren. This avoids listing entering a long list of keywords. Requested
+ by M. Schwern.
+
+ - Added option to delete a backup of original file with in-place-modify (-b)
+ if there were no errors. This can be requested with the flag -bext='/'.
+ See documentation for details. Requested by M. Schwern and others.
+
+ - Fixed bug where the module postfilter parameter was not applied when -b
+ flag was used. This was discovered during testing.
+
+ - Fixed in-place-modify (-b) to work with symbolic links to source files.
+ Thanks to Ted Johnson.
+
+ - Fixed bug where the Perl::Tidy module did not allow -b to be used
+ in some cases.
+
+ - No extra blank line is added before a comment which follows
+ a short line ending in an opening token, for example like this:
+ OLD:
+ if (
+
+ # unless we follow a blank or comment line
+ $last_line_leading_type !~ /^[#b]$/
+ ...
+
+ NEW:
+ if (
+ # unless we follow a blank or comment line
+ $last_line_leading_type !~ /^[#b]$/
+ ...
+
+ The blank is not needed for readability in these cases because there
+ already is already space above the comment. If a blank already
+ exists there it will not be removed, so this change should not
+ change code which has previously been formatted with perltidy.
+ Thanks to R.W.Stauner.
+
+ - Likewise, no extra blank line is added above a comment consisting of a
+ single #, since nothing is gained in readability.
+
+ - Fixed error in which a blank line was removed after a #>>> directive.
+ Thanks to Ricky Morse.
+
+ - Unnecessary semicolons after given/when/default blocks are now removed.
+
+ - Fixed bug where an unwanted blank line could be added before
+ pod text in __DATA__ or __END__ section. Thanks to jidani.
+
+ - Changed exit flags from 1 to 0 to indicate success for -help, -version,
+ and all -dump commands. Also added -? as another way to dump the help.
+ Requested by Keith Neargarder.
+
+ - Fixed bug where .ERR and .LOG files were not written except for -it=2 or more
+
+ - Fixed bug where trailing blank lines at the end of a file were dropped when
+ -it>1.
+
+ - Fixed bug where a line occasionally ended with an extra space. This reduces
+ rhe number of instances where a second iteration gives a result different
+ from the first.
+
+ - Updated documentation to note that the Tidy.pm module <stderr> parameter may
+ not be a reference to SCALAR or ARRAY; it must be a file.
+
+ - Syntax check with perl now work when the Tidy.pm module is processing
+ references to arrays and strings. Thanks to Charles Alderman.
+
+ - Zero-length files are no longer processed due to concerns for data loss
+ due to side effects in some scenarios.
+
+ - block labels, if any, are now included in closing side comment text
+ when the -csc flag is used. Suggested by Aaron. For example,
+ the label L102 in the following block is now included in the -csc text:
+
+ L102: for my $i ( 1 .. 10 ) {
+ ...
+ } ## end L102: for my $i ( 1 .. 10 )
+