]> git.donarmstrong.com Git - perltidy.git/blobdiff - docs/ChangeLog.html
New upstream version 20200110
[perltidy.git] / docs / ChangeLog.html
index 895f0427c602fcdbf0171c8c9a3f99c69901d31a..6457896bcf5a214c2129011a3e6cb5ae139c6e7a 100644 (file)
@@ -1,5 +1,139 @@
 <h1>Perltidy Change Log</h1>
 
+<h2>2020 01 10</h2>
+
+<pre><code>- This release adds a flag to control the feature RT#130394 (allow short nested blocks)
+  introduced in the previous release.  Unfortunately that feature breaks 
+  RPerl installations, so a control flag has been introduced and that feature is now
+  off by default.  The flag is:
+
+  --one-line-block-nesting=n, or -olbn=n, where n is an integer as follows: 
+
+  -olbn=0 break nested one-line blocks into multiple lines [new DEFAULT]
+  -olbn=1 stable; keep existing nested-one line blocks intact [previous DEFAULT]
+
+  For example, consider this input line:
+
+    foreach (@list) { if ($_ eq $asked_for) { last } ++$found }
+
+  The new default behavior (-olbn=0), and behavior prior to version 20191203, is to break it into multiple lines:
+
+    foreach (@list) {
+        if ( $_ eq $asked_for ) { last }
+        ++$found;
+    }
+
+  To keep nested one-line blocks such as this on a single line you can add the parameter -olbn=1.
+
+- Fixed issue RT#131288: parse error for un-prototyped constant function without parenthesized
+  call parameters followed by ternary.
+
+- Fixed issue RT#131360, installation documentation.  Added a note that the binary 
+  'perltidy' comes with the Perl::Tidy module. They can both normally be installed with 
+  'cpanm Perl::Tidy'
+</code></pre>
+
+<h2>2019 12 03</h2>
+
+<pre><code>- Fixed issue RT#131115: -bli option not working correctly.
+  Closing braces were not indented in some cases due to a glitch
+  introduced in version 20181120.
+
+- Fixed issue RT#130394: Allow short nested blocks.  Given the following
+
+    $factorial = sub { reduce { $a * $b } 1 .. 11 };
+
+  Previous versions would always break the sub block because it
+  contains another block (the reduce block).  The fix keeps
+  short one-line blocks such as this intact.
+
+- Implement issue RT#130640: Allow different subroutine keywords.
+  Added a flag --sub-alias-list=s or -sal=s, where s is a string with
+  one or more aliases for 'sub', separated by spaces or commas.
+  For example,
+
+    perltidy -sal='method fun' 
+
+  will cause the perltidy to treat the words 'method' and 'fun' to be
+  treated the same as if they were 'sub'.
+
+- Added flag --space-prototype-paren=i, or -spp=i, to control spacing 
+  before the opening paren of a prototype, where i=0, 1, or 2:
+  i=0 no space
+  i=1 follow input [current and default]
+  i=2 always space
+
+  Previously, perltidy always followed the input.
+  For example, given the following input 
+
+     sub usage();
+
+  The result will be:
+    sub usage();    # i=0 [no space]
+    sub usage();    # i=1 [default; follows input]
+    sub usage ();   # i=2 [space]
+
+- Fixed issue git#16, minor vertical alignment issue.
+
+- Fixed issue git#10, minor conflict of -wn and -ce
+
+- Improved some vertical alignments involving two lines.
+</code></pre>
+
+<h2>2019 09 15</h2>
+
+<pre><code>- fixed issue RT#130344: false warning "operator in print statement" 
+  for "use lib". 
+
+- fixed issue RT#130304: standard error output should include filename.
+  When perltidy error messages are directed to the standard error output 
+  with -se or --standard-error-output, the message lines now have a prefix 
+  'filename:' for clarification in case multiple files 
+  are processed, where 'filename' is the name of the input file.  If 
+  input is from the standard input the displayed filename is '&lt;stdin&gt;', 
+  and if it is from a data structure then displayed filename 
+  is '&lt;source_stream&gt;'.
+
+- implement issue RT#130425: check mode.  A new flag '--assert-tidy'
+  will cause an error message if the output script is not identical to
+  the input script. For completeness, the opposite flag '--assert-untidy'
+  has also been added.  The next item, RT#130297, insures that the script
+  will exit with a non-zero exit flag if the assertion fails.
+
+- fixed issue RT#130297; the perltidy script now exits with a nonzero exit 
+  status if it wrote to the standard error output. Prevously only fatal
+  run errors produced a non-zero exit flag. Now, even non-fatal messages
+  requested with the -w flag will cause a non-zero exit flag.  The exit
+  flag now has these values:
+
+     0 = no errors
+     1 = perltidy could not run to completion due to errors
+     2 = perltidy ran to completion with error messages
+
+- added warning message for RT#130008, which warns of conflicting input
+  parameters -iob and -bom or -boc.
+
+- fixed RT#129850; concerning a space between a closing block brace and
+  opening bracket or brace, as occurs before the '[' in this line:
+
+   my @addunix = map { File::Spec::Unix-&gt;catfile( @ROOT, @$_ ) } ['b'];
+
+  Formerly, any space was removed. Now it is optional, and the output will
+  follow the input.
+
+- fixed issue git#13, needless trailing whitespace in error message
+
+- fixed issue git#9: if the -ce (--cuddled-else) flag is used,
+  do not try to form new one line blocks for a block type 
+  specified with -cbl, particularly map, sort, grep
+
+- iteration speedup for unchanged code.  Previously, when iterations were
+  requested, at least two formatting passes were made. Now just a single pass
+  is made if the formatted code is identical to the input code.
+
+- some improved vertical alignments
+</code></pre>
+
 <h2>2019 06 01</h2>
 
 <pre><code>- rt #128477: Prevent inconsistent owner/group and setuid/setgid bits. 
@@ -364,7 +498,7 @@ NEW:
 <h2>2017 05 21</h2>
 
 <pre><code>- Fixed debian #862667: failure to check for perltidy.ERR deletion can lead 
-  to overwriting abritrary files by symlink attack. Perltidy was continuing 
+  to overwriting arbitrary files by symlink attack. Perltidy was continuing
   to write files after an unlink failure.  Thanks to Don Armstrong 
   for a patch.
 
@@ -387,7 +521,7 @@ NEW:
   with --backup-and-modify-in-place. Thanks to Heinz Knutzen for this patch.
 
 - Fixed minor formatting issue where one-line blocks for subs with signatures 
-  were unnecesarily broken
+  were unnecessarily broken
 
 - RT #32905, patch to fix utf-8 error when output was STDOUT. 
 
@@ -468,7 +602,7 @@ NEW:
 
  - Fixed RT #107832 and #106492, lack of vertical alignment of two lines
    when -boc flag (break at old commas) is set.  This bug was 
-   inadvertantly introduced in previous bug fix RT #98902. 
+   inadvertently introduced in previous bug fix RT #98902. 
 
  - Some common extensions to Perl syntax are handled better.
    In particular, the following snippet is now foratted cleanly:
@@ -556,7 +690,7 @@ NEW:
 - Fixed RT #96101; Closing brace of anonymous sub in a list was being
   indented.  For example, the closing brace of the anonymous sub below 
   will now be lined up with the word 'callback'.  This problem 
-  occured if there was no comma after the closing brace of the anonymous sub.  
+  occurred if there was no comma after the closing brace of the anonymous sub.
   This update may cause minor changes to formatting of code with lists 
   of anonymous subs, especially TK code.
 
@@ -1283,7 +1417,7 @@ of nested statements.
      : undef;
 
 -Text following un-parenthesized if/unless/while/until statements get a
-full level of indentation.  Suggested by Jeff Armstorng and others. 
+full level of indentation.  Suggested by Jeff Armstrong and others.
 OLD:
    return $ship-&gt;chargeWeapons("phaser-canon")
      if $encounter-&gt;description eq 'klingon'
@@ -2073,7 +2207,7 @@ a terminal =cut.  Thanks to Mike Birdsall for reporting this.
  external calls to Tidy.pm module.  Fixed incorrect html title when
  Tidy.pm is called with IO::Scalar or IO::Array source.
 
--Output file permissons are now set as follows.  An output script file
+-Output file permissions are now set as follows.  An output script file
  gets the same permission as the input file, except that owner
  read/write permission is added (otherwise, perltidy could not be
  rerun).  Html output files use system defaults.  Previously chmod 0755
@@ -3043,7 +3177,7 @@ new: my $fee = CalcReserveFee(
 -I updated the tokenizer to allow $#+ and $#-, which seem to be new to
 Perl 5.6.  Some experimenting with a recent version of Perl indicated
 that it allows these non-alphanumeric '$#' array maximum index
-varaibles: $#: $#- $#+ so I updated the parser accordingly.  Only $#:
+variables: $#: $#- $#+ so I updated the parser accordingly.  Only $#:
 seems to be valid in older versions of Perl.
 
 -Fixed a rare formatting problem with -lp (and -gnu) which caused