+ 2010 12 17
+ - added new flag -it=n or --iterations=n
+ This flag causes perltidy to do n complete iterations.
+ For most purposes the default of n=1 should be satisfactory. However n=2
+ can be useful when a major style change is being made, or when code is being
+ beautified on check-in to a source code control system. The run time will be
+ approximately proportional to n, and it should seldom be necessary to use a
+ value greater than n=2. Thanks to Jonathan Swartz
+
+ - A configuration file pathname begins with three dots, e.g.
+ ".../.perltidyrc", indicates that the file should be searched for starting
+ in the current directory and working upwards. This makes it easier to have
+ multiple projects each with their own .perltidyrc in their root directories.
+ Thanks to Jonathan Swartz for this patch.
+
+ - Added flag --notidy which disables all formatting and causes the input to be
+ copied unchanged. This can be useful in conjunction with hierarchical
+ F<.perltidyrc> files to prevent unwanted tidying.
+ Thanks to Jonathan Swartz for this patch.
+
+ - Added prefilters and postfilters in the call to the Tidy.pm module.
+ Prefilters and postfilters. The prefilter is a code reference that
+ will be applied to the source before tidying, and the postfilter
+ is a code reference to the result before outputting.
+
+ Thanks to Jonathan Swartz for this patch. He writes:
+ This is useful for all manner of customizations. For example, I use
+ it to convert the 'method' keyword to 'sub' so that perltidy will work for
+ Method::Signature::Simple code:
+
+ Perl::Tidy::perltidy(
+ prefilter => sub { $_ = $_[0]; s/^method (.*)/sub $1 \#__METHOD/gm; return $_ },
+ postfilter => sub { $_ = $_[0]; s/^sub (.*?)\s* \#__METHOD/method $1/gm; return $_ }
+ );
+
+ - The starting indentation level of sections of code entabbed with -et=n
+ is correctly guessed if it was also produced with the same -et=n flag. This
+ keeps the indentation stable on repeated formatting passes within an editor.
+ Thanks to Sam Kington and Glenn.
+
+ - Functions with prototype '&' had a space between the function and opening
+ peren. This space now only occurs if the flag --space-function-paren (-sfp)
+ is set. Thanks to Zrajm Akfohg.
+
+ - Patch to never put spaces around a bare word in braces beginning with ^ as in:
+ my $before = ${^PREMATCH};
+ even if requested with the -bt=0 flag because any spaces cause a syntax error in perl.
+ Thanks to Fabrice Dulanoy.
+
+ 2009 06 16
+ - Allow configuration file to be 'perltidy.ini' for Windows systems.
+ i.e. C:\Documents and Settings\User\perltidy.ini
+ and added documentation for setting configuation file under Windows in man
+ page. Thanks to Stuart Clark.
+
+ - Corrected problem of unwanted semicolons in hash ref within given/when code.
+ Thanks to Nelo Onyiah.
+
+ - added new flag -cscb or --closing-side-comments-balanced
+ When using closing-side-comments, and the closing-side-comment-maximum-text
+ limit is exceeded, then the comment text must be truncated. Previous
+ versions of perltidy terminate with three dots, and this can still be
+ achieved with -ncscb:
+
+ perltidy -csc -ncscb
+
+ } ## end foreach my $foo (sort { $b cmp $a ...
+
+ However this causes a problem with older editors which cannot recognize
+ comments or are not configured to doso because they cannot "bounce" around in
+ the text correctly. The B<-cscb> flag tries to help them by
+ appending appropriate terminal balancing structure:
+
+ perltidy -csc -cscb
+
+ } ## end foreach my $foo (sort { $b cmp $a ... })
+
+ Since there is much to be gained and little to be lost by doing this,
+ the default is B<-cscb>. Use B<-ncscb> if you do not want this.
+
+ Thanks to Daniel Becker for suggesting this option.
+
+ - After an isolated closing eval block the continuation indentation will be
+ removed so that the braces line up more like other blocks. Thanks to Yves Orton.
+
+ OLD:
+ eval {
+ #STUFF;
+ 1; # return true
+ }
+ or do {
+ #handle error
+ };
+
+ NEW:
+ eval {
+ #STUFF;
+ 1; # return true
+ } or do {
+ #handle error
+ };
+
+ -A new flag -asbl (or --opening-anonymous-sub-brace-on-new-line) has
+ been added to put the opening brace of anonymous sub's on a new line,
+ as in the following snippet:
+
+ my $code = sub
+ {
+ my $arg = shift;
+ return $arg->(@_);
+ };
+
+ This was not possible before because the -sbl flag only applies to named
+ subs. Thanks to Benjamin Krupp.
+
+ -Fix tokenization bug with the following snippet
+ print 'hi' if { x => 1, }->{x};
+ which resulted in a semicolon being added after the comma. The workaround
+ was to use -nasc, but this is no longer necessary. Thanks to Brian Duggan.
+
+ -Fixed problem in which an incorrect error message could be triggered
+ by the (unusual) combination of parameters -lp -i=0 -l=2 -ci=0 for
+ example. Thanks to Richard Jelinek.
+
+ -A new flag --keep-old-blank-lines=n has been added to
+ give more control over the treatment of old blank lines in
+ a script. The manual has been revised to discuss the new
+ flag and clarify the treatment of old blank lines. Thanks
+ to Oliver Schaefer.
+