From: Steve Hancock Date: Sun, 6 Dec 2020 19:26:52 +0000 (-0800) Subject: update version to 20201207 X-Git-Tag: 20201207 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=20201207;p=perltidy.git update version to 20201207 --- diff --git a/CHANGES.md b/CHANGES.md index 26f382a6..6c2ddc32 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,25 @@ # Perltidy Change Log -## 2020 12 02 +## 2020 12 07 + + - Fixed issue git #47, incorrect welding of anonymous subs. + An incorrect weld format was being made when the --weld-nested-containers option + (-wn) was used in to format a function which returns a list of anonymous subs. + For example, the following snippet was incorrectly being welded. + + $promises[$i]->then( + sub { $all->resolve(@_); () }, + sub { + $results->[$i] = [@_]; + $all->reject(@$results) if --$remaining <= 0; + return (); + } + ); + + This was due to an error introduced in v20201201 related to parsing sub + signatures. Reformatting with the current version will fix the problem. + +## 2020 12 01 - This release is being made primarily to make available a several new formatting parameters, in particular -xci, -kbb=s, -kba=s, and -wnxl=s. No significant diff --git a/bin/perltidy b/bin/perltidy index ad75b5b3..57113b91 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -4560,7 +4560,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module =head1 VERSION -This man page documents perltidy version 20201202 +This man page documents perltidy version 20201207 =head1 BUG REPORTS diff --git a/docs/BugLog.html b/docs/BugLog.html index 401ad56c..cb5402f4 100644 --- a/docs/BugLog.html +++ b/docs/BugLog.html @@ -12,11 +12,44 @@ +

Issues fixed after release 20201202

+ +
+ +
Fix for issue git #47
+
+ +

This issue has to do with the --weld-nested-containers option in the specific case of formatting a function which returns a list of anonymous subs. For example

+ +
    $promises[$i]->then(
+        sub { $all->resolve(@_); () },
+        sub {
+            $results->[$i] = [@_];
+            $all->reject(@$results) if --$remaining <= 0;
+            return ();
+        }
+    );
+ +

A bug introduced in v20201202 caused an incorrect welding to occur when the -wn flag was set

+ +
    $promises[$i]->then( sub { $all->resolve(@_); () },
+        sub {
+        $results->[$i] = [@_];
+        $all->reject(@$results) if --$remaining <= 0;
+        return ();
+        } );
+ +

This bug has been fixed, and code which has been incorrectly formatted will be correctly formatted with the next release. The bug was a result of a new coding introduced in v20201202 for fixing some issues with parsing sub signatures. Previously they were sometimes parsed the same as prototypes and sometimes as lists, now they are always parsed as lists.

+ +
+
+

Issues fixed after release 20201001

diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index f5905397..6937e365 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -1,6 +1,26 @@

Perltidy Change Log

-

2020 12 02

+

2020 12 07

+ +
- Fixed issue git #47, incorrect welding of anonymous subs. 
+  An incorrect weld format was being made when the --weld-nested-containers option
+  (-wn) was used in to format a function which returns a list of anonymous subs.
+  For example, the following snippet was incorrectly being welded.
+
+$promises[$i]->then(
+    sub { $all->resolve(@_); () },
+    sub {
+        $results->[$i] = [@_];
+        $all->reject(@$results) if --$remaining <= 0;
+        return ();
+    }
+);
+
+This was due to an error introduced in v20201201 related to parsing sub
+signatures.  Reformatting with the current version will fix the problem.
+
+ +

2020 12 01

- This release is being made primarily to make available a several new formatting 
   parameters, in particular -xci, -kbb=s, -kba=s, and -wnxl=s. No significant 
diff --git a/docs/Tidy.html b/docs/Tidy.html
index 5b0221b2..be01abdd 100644
--- a/docs/Tidy.html
+++ b/docs/Tidy.html
@@ -372,7 +372,7 @@
 
 

VERSION

-

This man page documents Perl::Tidy version 20201202

+

This man page documents Perl::Tidy version 20201207

LICENSE

diff --git a/docs/perltidy.html b/docs/perltidy.html index 1a5be9e1..3914d9cc 100644 --- a/docs/perltidy.html +++ b/docs/perltidy.html @@ -3522,7 +3522,7 @@

VERSION

-

This man page documents perltidy version 20201202

+

This man page documents perltidy version 20201207

BUG REPORTS

diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 5160a4b3..e16144aa 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -110,7 +110,7 @@ BEGIN { # Release version must be bumped, and it is probably past time for a # release anyway. - $VERSION = '20201202'; + $VERSION = '20201207'; } sub DESTROY { diff --git a/lib/Perl/Tidy.pod b/lib/Perl/Tidy.pod index 9ff8b49e..2895c5e4 100644 --- a/lib/Perl/Tidy.pod +++ b/lib/Perl/Tidy.pod @@ -432,7 +432,7 @@ The module 'Perl::Tidy' comes with a binary 'perltidy' which is installed when t =head1 VERSION -This man page documents Perl::Tidy version 20201202 +This man page documents Perl::Tidy version 20201207 =head1 LICENSE diff --git a/lib/Perl/Tidy/Debugger.pm b/lib/Perl/Tidy/Debugger.pm index def7d724..28a3b33a 100644 --- a/lib/Perl/Tidy/Debugger.pm +++ b/lib/Perl/Tidy/Debugger.pm @@ -7,7 +7,7 @@ package Perl::Tidy::Debugger; use strict; use warnings; -our $VERSION = '20201202'; +our $VERSION = '20201207'; sub new { diff --git a/lib/Perl/Tidy/DevNull.pm b/lib/Perl/Tidy/DevNull.pm index 9ad7ae22..60449b58 100644 --- a/lib/Perl/Tidy/DevNull.pm +++ b/lib/Perl/Tidy/DevNull.pm @@ -7,7 +7,7 @@ package Perl::Tidy::DevNull; use strict; use warnings; -our $VERSION = '20201202'; +our $VERSION = '20201207'; sub new { my $self = shift; return bless {}, $self } sub print { return } sub close { return } diff --git a/lib/Perl/Tidy/Diagnostics.pm b/lib/Perl/Tidy/Diagnostics.pm index cf83d274..ceadacbc 100644 --- a/lib/Perl/Tidy/Diagnostics.pm +++ b/lib/Perl/Tidy/Diagnostics.pm @@ -20,7 +20,7 @@ package Perl::Tidy::Diagnostics; use strict; use warnings; -our $VERSION = '20201202'; +our $VERSION = '20201207'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/FileWriter.pm b/lib/Perl/Tidy/FileWriter.pm index 63b7fde0..47ddc8aa 100644 --- a/lib/Perl/Tidy/FileWriter.pm +++ b/lib/Perl/Tidy/FileWriter.pm @@ -7,7 +7,7 @@ package Perl::Tidy::FileWriter; use strict; use warnings; -our $VERSION = '20201202'; +our $VERSION = '20201207'; use constant DEVEL_MODE => 0; diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 8160adf5..a7608595 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -49,7 +49,7 @@ use constant DEVEL_MODE => 0; { #<<< A non-indenting brace to contain all lexical variables use Carp; -our $VERSION = '20201202'; +our $VERSION = '20201207'; # The Tokenizer will be loaded with the Formatter ##use Perl::Tidy::Tokenizer; # for is_keyword() diff --git a/lib/Perl/Tidy/HtmlWriter.pm b/lib/Perl/Tidy/HtmlWriter.pm index e8413511..9c85cc15 100644 --- a/lib/Perl/Tidy/HtmlWriter.pm +++ b/lib/Perl/Tidy/HtmlWriter.pm @@ -7,7 +7,7 @@ package Perl::Tidy::HtmlWriter; use strict; use warnings; -our $VERSION = '20201202'; +our $VERSION = '20201207'; use File::Basename; diff --git a/lib/Perl/Tidy/IOScalar.pm b/lib/Perl/Tidy/IOScalar.pm index 92665cca..68972bb1 100644 --- a/lib/Perl/Tidy/IOScalar.pm +++ b/lib/Perl/Tidy/IOScalar.pm @@ -10,7 +10,7 @@ package Perl::Tidy::IOScalar; use strict; use warnings; use Carp; -our $VERSION = '20201202'; +our $VERSION = '20201207'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/IOScalarArray.pm b/lib/Perl/Tidy/IOScalarArray.pm index fb782fd3..bd71fbe6 100644 --- a/lib/Perl/Tidy/IOScalarArray.pm +++ b/lib/Perl/Tidy/IOScalarArray.pm @@ -14,7 +14,7 @@ package Perl::Tidy::IOScalarArray; use strict; use warnings; use Carp; -our $VERSION = '20201202'; +our $VERSION = '20201207'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/IndentationItem.pm b/lib/Perl/Tidy/IndentationItem.pm index 5ded75a1..5453c583 100644 --- a/lib/Perl/Tidy/IndentationItem.pm +++ b/lib/Perl/Tidy/IndentationItem.pm @@ -8,7 +8,7 @@ package Perl::Tidy::IndentationItem; use strict; use warnings; -our $VERSION = '20201202'; +our $VERSION = '20201207'; BEGIN { diff --git a/lib/Perl/Tidy/LineBuffer.pm b/lib/Perl/Tidy/LineBuffer.pm index 02a85f06..f4f15f0c 100644 --- a/lib/Perl/Tidy/LineBuffer.pm +++ b/lib/Perl/Tidy/LineBuffer.pm @@ -12,7 +12,7 @@ package Perl::Tidy::LineBuffer; use strict; use warnings; -our $VERSION = '20201202'; +our $VERSION = '20201207'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/LineSink.pm b/lib/Perl/Tidy/LineSink.pm index 084e145f..d25080a3 100644 --- a/lib/Perl/Tidy/LineSink.pm +++ b/lib/Perl/Tidy/LineSink.pm @@ -8,7 +8,7 @@ package Perl::Tidy::LineSink; use strict; use warnings; -our $VERSION = '20201202'; +our $VERSION = '20201207'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/LineSource.pm b/lib/Perl/Tidy/LineSource.pm index 8c3e0c39..7c04c608 100644 --- a/lib/Perl/Tidy/LineSource.pm +++ b/lib/Perl/Tidy/LineSource.pm @@ -8,7 +8,7 @@ package Perl::Tidy::LineSource; use strict; use warnings; -our $VERSION = '20201202'; +our $VERSION = '20201207'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/Logger.pm b/lib/Perl/Tidy/Logger.pm index d48a973f..d6ef7369 100644 --- a/lib/Perl/Tidy/Logger.pm +++ b/lib/Perl/Tidy/Logger.pm @@ -7,7 +7,7 @@ package Perl::Tidy::Logger; use strict; use warnings; -our $VERSION = '20201202'; +our $VERSION = '20201207'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 691af758..932c8816 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -21,7 +21,7 @@ package Perl::Tidy::Tokenizer; use strict; use warnings; -our $VERSION = '20201202'; +our $VERSION = '20201207'; use Perl::Tidy::LineBuffer; use Carp; diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index e3219c31..70838489 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -1,7 +1,7 @@ package Perl::Tidy::VerticalAligner; use strict; use warnings; -our $VERSION = '20201202'; +our $VERSION = '20201207'; use Perl::Tidy::VerticalAligner::Alignment; use Perl::Tidy::VerticalAligner::Line; @@ -3008,6 +3008,7 @@ sub delete_null_alignments { } # End loopover lines $end_match->(); } # End loop over subgroups + return; } ## end sub delete_null_alignments sub fat_comma_to_comma { diff --git a/lib/Perl/Tidy/VerticalAligner/Alignment.pm b/lib/Perl/Tidy/VerticalAligner/Alignment.pm index e6b0ecab..e5a33df1 100644 --- a/lib/Perl/Tidy/VerticalAligner/Alignment.pm +++ b/lib/Perl/Tidy/VerticalAligner/Alignment.pm @@ -10,7 +10,7 @@ use warnings; { #<<< A non-indenting brace -our $VERSION = '20201202'; +our $VERSION = '20201207'; # _column_ # the current column number # _saved_column_ # a place for temporary storage diff --git a/lib/Perl/Tidy/VerticalAligner/Line.pm b/lib/Perl/Tidy/VerticalAligner/Line.pm index a747adb9..b7ddcfe9 100644 --- a/lib/Perl/Tidy/VerticalAligner/Line.pm +++ b/lib/Perl/Tidy/VerticalAligner/Line.pm @@ -8,7 +8,7 @@ package Perl::Tidy::VerticalAligner::Line; use strict; use warnings; -our $VERSION = '20201202'; +our $VERSION = '20201207'; BEGIN { my $i = 0;