# 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
=head1 VERSION
-This man page documents perltidy version 20201202
+This man page documents perltidy version 20201207
=head1 BUG REPORTS
<ul id="index">
+ <li><a href="#Issues-fixed-after-release-20201202">Issues fixed after release 20201202</a></li>
<li><a href="#Issues-fixed-after-release-20201001">Issues fixed after release 20201001</a></li>
<li><a href="#Issues-fixed-after-release-20200907">Issues fixed after release 20200907</a></li>
<li><a href="#Open-Issues">Open Issues</a></li>
</ul>
+<h1 id="Issues-fixed-after-release-20201202">Issues fixed after release 20201202</h1>
+
+<dl>
+
+<dt id="Fix-for-issue-git-47"><b>Fix for issue git #47</b></dt>
+<dd>
+
+<p>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</p>
+
+<pre><code> $promises[$i]->then(
+ sub { $all->resolve(@_); () },
+ sub {
+ $results->[$i] = [@_];
+ $all->reject(@$results) if --$remaining <= 0;
+ return ();
+ }
+ );</code></pre>
+
+<p>A bug introduced in v20201202 caused an incorrect welding to occur when the -wn flag was set</p>
+
+<pre><code> $promises[$i]->then( sub { $all->resolve(@_); () },
+ sub {
+ $results->[$i] = [@_];
+ $all->reject(@$results) if --$remaining <= 0;
+ return ();
+ } );</code></pre>
+
+<p>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.</p>
+
+</dd>
+</dl>
+
<h1 id="Issues-fixed-after-release-20201001">Issues fixed after release 20201001</h1>
<dl>
<h1>Perltidy Change Log</h1>
-<h2>2020 12 02</h2>
+<h2>2020 12 07</h2>
+
+<pre><code>- 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.
+</code></pre>
+
+<h2>2020 12 01</h2>
<pre><code>- 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
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents Perl::Tidy version 20201202</p>
+<p>This man page documents Perl::Tidy version 20201207</p>
<h1 id="LICENSE">LICENSE</h1>
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents perltidy version 20201202</p>
+<p>This man page documents perltidy version 20201207</p>
<h1 id="BUG-REPORTS">BUG REPORTS</h1>
# Release version must be bumped, and it is probably past time for a
# release anyway.
- $VERSION = '20201202';
+ $VERSION = '20201207';
}
sub DESTROY {
=head1 VERSION
-This man page documents Perl::Tidy version 20201202
+This man page documents Perl::Tidy version 20201207
=head1 LICENSE
package Perl::Tidy::Debugger;
use strict;
use warnings;
-our $VERSION = '20201202';
+our $VERSION = '20201207';
sub new {
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 }
package Perl::Tidy::Diagnostics;
use strict;
use warnings;
-our $VERSION = '20201202';
+our $VERSION = '20201207';
sub AUTOLOAD {
package Perl::Tidy::FileWriter;
use strict;
use warnings;
-our $VERSION = '20201202';
+our $VERSION = '20201207';
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()
package Perl::Tidy::HtmlWriter;
use strict;
use warnings;
-our $VERSION = '20201202';
+our $VERSION = '20201207';
use File::Basename;
use strict;
use warnings;
use Carp;
-our $VERSION = '20201202';
+our $VERSION = '20201207';
sub AUTOLOAD {
use strict;
use warnings;
use Carp;
-our $VERSION = '20201202';
+our $VERSION = '20201207';
sub AUTOLOAD {
package Perl::Tidy::IndentationItem;
use strict;
use warnings;
-our $VERSION = '20201202';
+our $VERSION = '20201207';
BEGIN {
package Perl::Tidy::LineBuffer;
use strict;
use warnings;
-our $VERSION = '20201202';
+our $VERSION = '20201207';
sub AUTOLOAD {
package Perl::Tidy::LineSink;
use strict;
use warnings;
-our $VERSION = '20201202';
+our $VERSION = '20201207';
sub AUTOLOAD {
package Perl::Tidy::LineSource;
use strict;
use warnings;
-our $VERSION = '20201202';
+our $VERSION = '20201207';
sub AUTOLOAD {
package Perl::Tidy::Logger;
use strict;
use warnings;
-our $VERSION = '20201202';
+our $VERSION = '20201207';
sub AUTOLOAD {
package Perl::Tidy::Tokenizer;
use strict;
use warnings;
-our $VERSION = '20201202';
+our $VERSION = '20201207';
use Perl::Tidy::LineBuffer;
use Carp;
package Perl::Tidy::VerticalAligner;
use strict;
use warnings;
-our $VERSION = '20201202';
+our $VERSION = '20201207';
use Perl::Tidy::VerticalAligner::Alignment;
use Perl::Tidy::VerticalAligner::Line;
} # End loopover lines
$end_match->();
} # End loop over subgroups
+ return;
} ## end sub delete_null_alignments
sub fat_comma_to_comma {
{ #<<< A non-indenting brace
-our $VERSION = '20201202';
+our $VERSION = '20201207';
# _column_ # the current column number
# _saved_column_ # a place for temporary storage
package Perl::Tidy::VerticalAligner::Line;
use strict;
use warnings;
-our $VERSION = '20201202';
+our $VERSION = '20201207';
BEGIN {
my $i = 0;