]> git.donarmstrong.com Git - perltidy.git/commitdiff
prepare for release of VERSION 20200110
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 7 Jan 2020 16:38:35 +0000 (08:38 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 7 Jan 2020 16:38:35 +0000 (08:38 -0800)
24 files changed:
CHANGES.md
bin/perltidy
docs/ChangeLog.html
docs/Tidy.html
docs/perltidy.html
lib/Perl/Tidy.pm
lib/Perl/Tidy.pod
lib/Perl/Tidy/Debugger.pm
lib/Perl/Tidy/DevNull.pm
lib/Perl/Tidy/Diagnostics.pm
lib/Perl/Tidy/FileWriter.pm
lib/Perl/Tidy/Formatter.pm
lib/Perl/Tidy/HtmlWriter.pm
lib/Perl/Tidy/IOScalar.pm
lib/Perl/Tidy/IOScalarArray.pm
lib/Perl/Tidy/IndentationItem.pm
lib/Perl/Tidy/LineBuffer.pm
lib/Perl/Tidy/LineSink.pm
lib/Perl/Tidy/LineSource.pm
lib/Perl/Tidy/Logger.pm
lib/Perl/Tidy/Tokenizer.pm
lib/Perl/Tidy/VerticalAligner.pm
lib/Perl/Tidy/VerticalAligner/Alignment.pm
lib/Perl/Tidy/VerticalAligner/Line.pm

index d65ea3e93fc6deaebad34427396fea9d445c8210..953953c8045781cdfe3e555fa0f4aa55b6a6a152 100644 (file)
@@ -1,23 +1,36 @@
 # Perltidy Change Log
 
-## 2019 12 03.01
+## 2020 01 10
 
-    - Added a flag to control the feature RT#130394, allow short nested blocks,
-      introduced in the previous release.  This feature breaks existing RPerl
-      installations, so a control flag has been introduced and the feature is
+    - This release adds a flag to control the feature RT#130394 (allow short nested blocks)
+      introduced in the previous release.  Unfortunately that feature breaks existing 
+      RPerl installations, so a control flag has been introduced and that feature is now
       off by default.  The flag is:
 
-      --one-line-block-nesting=i, or -olbn=i, where
+      --one-line-block-nesting=n, or -olbn=n, where n is an integer as follows
 
-      -olbn=0 do not allow nested one-line blocks [DEFAULT]
-      -olbn=1 allow nested-one line blocks
+      -olbn=0 break nested one-line blocks into multiple lines [new DEFAULT]
+      -olbn=1 stable; keep existing nested-one line blocks intact
 
-    - Fixed issue RT#131288: parse error for un-prototyped constant function
-      followed by ternary.
+      For example, consider this input line:
 
-    - Fixed issue RT#131360, installation documentation.  Metacpan generates
-      instructions for the perltidy binary which are incorrect. The binary
-      comes with Perl::Tidy. They can both be installed with 'cpanm Perl::Tidy'
+         foreach (@list) { if ($_ eq $asked_for) { last } ++$found }
+
+      The default behavior (-olbn=0) is to break it into multiple lines:
+
+         foreach (@list) {
+                if ( $_ eq $asked_for ) { last }
+                ++$found;
+         }
+
+      To keep nested one-line blocks like 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'
 
 
 ## 2019 12 03
index e3bd70d155209f50c6e76c695ada64403aa2f00c..2ee131f3d4f36ebb4c8f5b8b6ea3b9e1082bfcc2 100755 (executable)
@@ -3105,25 +3105,27 @@ semicolon.  So these two options are not exact inverses.
 
 =item B<-olbn=n>, B<--one-line-block-nesting=n>
 
-One-line blocks which themselves contain code blocks will normally be broken
-into multiple lines.  This behavior can be controlled with this flag.  The
-values of n are:
+Nested one-line blocks are lines with code blocks which themselves contain code
+blocks.  For example, the following line is a nested one-line block.
 
-  n=0 do not allow nested one-line blocks [DEFAULT]
-  n=1 stable: keep existing nested-one line blocks
+         foreach (@list) { if ($_ eq $asked_for) { last } ++$found }
 
-For example, given the following line:
+The default behavior is to break such lines into multiple lines, but this
+behavior can be controlled with this flag.  The values of n are:
 
-    sub nospacesplit { map { /^\s*$/ ? () : $_ } split $_[0], $_[1] }
+  n=0 break nested one-line blocks into multiple lines [DEFAULT]
+  n=1 stable: keep existing nested-one line blocks intact
 
+For the above example, the default formatting (B<-olbn=0>) is
 
-the default behavior (B<-olbn=0>) is to break it into multiple lines:
-
-    sub nospacesplit {
-        map { /^\s*$/ ? () : $_ } split $_[0], $_[1];
+    foreach (@list) {
+        if ( $_ eq $asked_for ) { last }
+        ++$found;
     }
 
-The line will be left intact with B<-olbn=1>.
+If the parameter B<-olbn=1> is given, then the line will be left intact if it
+is a single line in the source, or it will be broken into multiple lines if it 
+is broken in multiple lines in the source.
 
 
 =back
@@ -3829,11 +3831,11 @@ perlstyle(1), Perl::Tidy(3)
 
 =head1 INSTALLATION
 
-The perltidy binary uses the Perl::Tidy module and is installed when that module is installed.  On many systems, the command 'cpanm Perl::Tidy' will install them.
+The perltidy binary uses the Perl::Tidy module and is installed when that module is installed.  Module installation is system-dependent.  On some systems, the command 'cpanm Perl::Tidy' will work.
 
 =head1 VERSION
 
-This man page documents perltidy version 20191203.01
+This man page documents perltidy version 20200110
 
 =head1 BUG REPORTS
 
@@ -3845,7 +3847,7 @@ The source code repository is at L<https://github.com/perltidy/perltidy>.
 
 =head1 COPYRIGHT
 
-Copyright (c) 2000-2018 by Steve Hancock
+Copyright (c) 2000-2020 by Steve Hancock
 
 =head1 LICENSE
 
index a9971b38edf52d5dfa8bf8834b28c381555f476d..11c757ee14cdc959e5aa6f5c1e2044b9b6978bb8 100644 (file)
@@ -1,23 +1,36 @@
 <h1>Perltidy Change Log</h1>
 
-<h2>2019 12 03.01</h2>
+<h2>2020 01 10</h2>
 
-<pre><code>- Added a flag to control the feature RT#130394, allow short nested blocks,
-  introduced in the previous release.  This feature breaks existing RPerl
-  installations, so a control flag has been introduced and the feature is
+<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 existing 
+  RPerl installations, so a control flag has been introduced and that feature is now
   off by default.  The flag is:
 
-  --one-line-block-nesting=i, or -olbn=i, where
+  --one-line-block-nesting=n, or -olbn=n, where n is an integer as follows
 
-  -olbn=0 do not allow nested one-line blocks [DEFAULT]
-  -olbn=1 allow nested-one line blocks
+  -olbn=0 break nested one-line blocks into multiple lines [new DEFAULT]
+  -olbn=1 stable; keep existing nested-one line blocks intact
 
-- Fixed issue RT#131288: parse error for un-prototyped constant function
-  followed by ternary.
+  For example, consider this input line:
 
-- Fixed issue RT#131360, installation documentation.  Metacpan generates
-  instructions for the perltidy binary which are incorrect. The binary
-  comes with Perl::Tidy. They can both be installed with 'cpanm Perl::Tidy'
+     foreach (@list) { if ($_ eq $asked_for) { last } ++$found }
+
+  The default behavior (-olbn=0) is to break it into multiple lines:
+
+     foreach (@list) {
+            if ( $_ eq $asked_for ) { last }
+            ++$found;
+     }
+
+  To keep nested one-line blocks like 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>
index 93fc0155cb7c471690e8b42abdbe0578bd432fd7..ee5cd67430bcde8c1f4596458fd8c582d34b3c5b 100644 (file)
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents Perl::Tidy version 20191203.01</p>
+<p>This man page documents Perl::Tidy version 20200110</p>
 
 <h1 id="LICENSE">LICENSE</h1>
 
index 8edae50bb78faadafea73527d6b98b7b630843d9..599c38de220f5a2c1a279d85b81219d5cfc1c0d9 100644 (file)
 <dt id="olbn-n---one-line-block-nesting-n"><b>-olbn=n</b>, <b>--one-line-block-nesting=n</b></dt>
 <dd>
 
-<p>One-line blocks which themselves contain code blocks will normally be broken into multiple lines. This behavior can be controlled with this flag. The values of n are:</p>
+<p>Nested one-line blocks are lines with code blocks which themselves contain code blocks. For example, the following line is a nested one-line block.</p>
 
-<pre><code>  n=0 do not allow nested one-line blocks [DEFAULT]
-  n=1 stable: keep existing nested-one line blocks</code></pre>
+<pre><code>         foreach (@list) { if ($_ eq $asked_for) { last } ++$found }</code></pre>
 
-<p>For example, given the following line:</p>
+<p>The default behavior is to break such lines into multiple lines, but this behavior can be controlled with this flag. The values of n are:</p>
 
-<pre><code>    sub nospacesplit { map { /^\s*$/ ? () : $_ } split $_[0], $_[1] }</code></pre>
+<pre><code>  n=0 break nested one-line blocks into multiple lines [DEFAULT]
+  n=1 stable: keep existing nested-one line blocks intact</code></pre>
 
-<p>the default behavior (<b>-olbn=0</b>) is to break it into multiple lines:</p>
+<p>For the above example, the default formatting (<b>-olbn=0</b>) is</p>
 
-<pre><code>    sub nospacesplit {
-        map { /^\s*$/ ? () : $_ } split $_[0], $_[1];
+<pre><code>    foreach (@list) {
+        if ( $_ eq $asked_for ) { last }
+        ++$found;
     }</code></pre>
 
-<p>The line will be left intact with <b>-olbn=1</b>.</p>
+<p>If the parameter <b>-olbn=1</b> is given, then the line will be left intact if it is a single line in the source, or it will be broken into multiple lines if it is broken in multiple lines in the source.</p>
 
 </dd>
 </dl>
 
 <h1 id="INSTALLATION">INSTALLATION</h1>
 
-<p>The perltidy binary uses the Perl::Tidy module and is installed when that module is installed. On many systems, the command &#39;cpanm Perl::Tidy&#39; will install them.</p>
+<p>The perltidy binary uses the Perl::Tidy module and is installed when that module is installed. Module installation is system-dependent. On some systems, the command &#39;cpanm Perl::Tidy&#39; will work.</p>
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents perltidy version 20191203.01</p>
+<p>This man page documents perltidy version 20200110</p>
 
 <h1 id="BUG-REPORTS">BUG REPORTS</h1>
 
 
 <h1 id="COPYRIGHT">COPYRIGHT</h1>
 
-<p>Copyright (c) 2000-2018 by Steve Hancock</p>
+<p>Copyright (c) 2000-2020 by Steve Hancock</p>
 
 <h1 id="LICENSE">LICENSE</h1>
 
index 05dcebb93a390d1099fb8e3b938605228a9efa37..b30410ec419fac2368e17b608c3baa500f23cda8 100644 (file)
@@ -110,7 +110,7 @@ BEGIN {
     # Release version must be bumped, and it is probably past time for a
     # release anyway.
 
-    $VERSION = '20191203.01';
+    $VERSION = '20200110';
 }
 
 sub streamhandle {
index a98ba8dd484ecb76b5aa576249b92a19dd713b23..9307ca0fef479126afe4d993192b916e9c5c24b6 100644 (file)
@@ -419,7 +419,7 @@ On many systems, the command 'cpanm Perl::Tidy' will install both the module Per
 
 =head1 VERSION
 
-This man page documents Perl::Tidy version 20191203.01
+This man page documents Perl::Tidy version 20200110
 
 =head1 LICENSE
 
index 74c035fb69cfeb2bbe38201f5c9b3da856726364..09b82855b360bcabb52f7955dabbcf9dba5c8a0f 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::Debugger;
 use strict;
 use warnings;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 sub new {
 
index df4c199e059900b6f2eeb2faee9daab3fd1daba6..42e09d0d31644ea0ae3e28dca024c18556af9320 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::DevNull;
 use strict;
 use warnings;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 sub new   { my $self = shift; return bless {}, $self }
 sub print { return }
 sub close { return }
index cb27ec2d1da81f3a741317f8dc77cf8bce3a9d99..1893f1c9262d18cf1dd2bed205bc30ec7604ce0c 100644 (file)
@@ -20,7 +20,7 @@
 package Perl::Tidy::Diagnostics;
 use strict;
 use warnings;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 sub new {
 
index 91e2447a56fcc465c71a108bfa635dcfd9207323..c598e1e8431f8390993342d285459cbbe0cdcb13 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::FileWriter;
 use strict;
 use warnings;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 # Maximum number of little messages; probably need not be changed.
 my $MAX_NAG_MESSAGES = 6;
index 3519412e9da767f1c2d33a7ed2fb760b4ec4d6c1..164ca4592ac85f65817c5d6431b66bf4b2f3f96c 100644 (file)
@@ -12,7 +12,7 @@ package Perl::Tidy::Formatter;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 # The Tokenizer will be loaded with the Formatter
 ##use Perl::Tidy::Tokenizer;    # for is_keyword()
index fb095289c62d3f5384032eb796a5b59258977854..24e8b6954653f2e5e86c63fd368562482fd44f6d 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::HtmlWriter;
 use strict;
 use warnings;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 use File::Basename;
 
index 5951ef7fddbe12fe4b9e5cb17dc3604cf8a69ac0..3d7014436a3ac6c0809800ce961fb4f74a17f02a 100644 (file)
@@ -10,7 +10,7 @@ package Perl::Tidy::IOScalar;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 sub new {
     my ( $package, $rscalar, $mode ) = @_;
index d73bb45bc1fc6dfbdcd2b06c454f5f4826df560a..17686eb64429fd80ac7d51a32b2886c7b84fa71a 100644 (file)
@@ -14,7 +14,7 @@ package Perl::Tidy::IOScalarArray;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 sub new {
     my ( $package, $rarray, $mode ) = @_;
index 0db007136f5bff760558029abb0642ca34129533..7a6c10062f27cb654bba7114faf6f7993266e354 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::IndentationItem;
 use strict;
 use warnings;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 sub new {
 
index 450a0774994e6326dcf5dcee8a8959465933bd9e..66e2858eabea414a13c8c2d0825061fdb7d397a4 100644 (file)
@@ -12,7 +12,7 @@
 package Perl::Tidy::LineBuffer;
 use strict;
 use warnings;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 sub new {
 
index dd6962e51f1975e852ce6c472acbaf0dcf0512b7..51a68268840e9831be482970ef52d27e3f8c64f5 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::LineSink;
 use strict;
 use warnings;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 sub new {
 
index f109b38720aacb985b9992480acd643dfe0c25ae..d11144d9911be7ea31ce9808fe140cfc99a8f7ec 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::LineSource;
 use strict;
 use warnings;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 sub new {
 
index 2b80c8eca0008b7463472c0efb2d85f41b74fc3e..cab937b3be03a59228ca3072d569d168f33db994 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::Logger;
 use strict;
 use warnings;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 sub new {
 
index 579078ddbd31cff6730896f07b15503c0fc35e83..e1d644a96bb06a3e89949e14a4edf45ff62e1270 100644 (file)
@@ -21,7 +21,7 @@
 package Perl::Tidy::Tokenizer;
 use strict;
 use warnings;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 use Perl::Tidy::LineBuffer;
 
index 561d6a6b06453efe0ef9488757005b81037449f6..7efabb58f1b22e59e5649fcfa40a1530625e2803 100644 (file)
@@ -1,7 +1,7 @@
 package Perl::Tidy::VerticalAligner;
 use strict;
 use warnings;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 use Perl::Tidy::VerticalAligner::Alignment;
 use Perl::Tidy::VerticalAligner::Line;
index 96f152a5e6c8a399b41e4b154d2c77977be75fc2..8a2c5c6d036495b7750304bd51e3c7e3fff5842b 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::VerticalAligner::Alignment;
 use strict;
 use warnings;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 {
 
index 6e938fc4d6a5738ea0e46282649d81b29dc35fc3..c5992694c5d3f233eb8ccae2c4a70e656ba23cad 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::VerticalAligner::Line;
 use strict;
 use warnings;
-our $VERSION = '20191203.01';
+our $VERSION = '20200110';
 
 {