# Perltidy Change Log
+## 2023 09 12
+
+ - Fix for git #124: remove a syntax error check which could cause
+ an incorrect error message when List::Gather::gather was used.
+
## 2023 09 09
- Added new parameters -wme, or --warn-missing-else, and -ame,
=head1 VERSION
-This man page documents perltidy version 20230909
+This man page documents perltidy version 20230912
=head1 BUG REPORTS
<h1>Perltidy Change Log</h1>
+<h2>2023 09 12</h2>
+
+<pre><code>- Fix for git #124: remove a syntax error check which could cause
+ an incorrect error message when List::Gather::gather was used.
+</code></pre>
+
<h2>2023 09 09</h2>
<pre><code>- Added new parameters -wme, or --warn-missing-else, and -ame,
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents Perl::Tidy version 20230909</p>
+<p>This man page documents Perl::Tidy version 20230912</p>
<h1 id="LICENSE">LICENSE</h1>
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents perltidy version 20230909</p>
+<p>This man page documents perltidy version 20230912</p>
<h1 id="BUG-REPORTS">BUG REPORTS</h1>
# then the Release version must be bumped, and it is probably past time for
# a release anyway.
- $VERSION = '20230909';
+ $VERSION = '20230912';
} ## end BEGIN
sub DESTROY {
=head1 VERSION
-This man page documents Perl::Tidy version 20230909
+This man page documents Perl::Tidy version 20230912
=head1 LICENSE
use strict;
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20230909';
+our $VERSION = '20230912';
use constant EMPTY_STRING => q{};
use constant SPACE => q{ };
use strict;
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20230909';
+our $VERSION = '20230912';
use constant EMPTY_STRING => q{};
package Perl::Tidy::FileWriter;
use strict;
use warnings;
-our $VERSION = '20230909';
+our $VERSION = '20230912';
use constant DEVEL_MODE => 0;
use constant EMPTY_STRING => q{};
use Carp;
use English qw( -no_match_vars );
use List::Util qw( min max first ); # min, max first are in Perl 5.8
-our $VERSION = '20230909';
+our $VERSION = '20230912';
# 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 = '20230909';
+our $VERSION = '20230912';
use English qw( -no_match_vars );
use File::Basename;
use strict;
use warnings;
use Carp;
-our $VERSION = '20230909';
+our $VERSION = '20230912';
use constant DEVEL_MODE => 0;
use constant EMPTY_STRING => q{};
use strict;
use warnings;
use Carp;
-our $VERSION = '20230909';
+our $VERSION = '20230912';
use constant DEVEL_MODE => 0;
package Perl::Tidy::IndentationItem;
use strict;
use warnings;
-our $VERSION = '20230909';
+our $VERSION = '20230912';
BEGIN {
package Perl::Tidy::Logger;
use strict;
use warnings;
-our $VERSION = '20230909';
+our $VERSION = '20230912';
use English qw( -no_match_vars );
use constant DEVEL_MODE => 0;
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20230909';
+our $VERSION = '20230912';
use Carp;
if ( defined($rvars) ) {
my ( $type_lp, $want_brace ) = @{$rvars};
- # Now verify that this is not a trailing form
- if ( !$want_brace ) {
+ # OLD: Now verify that this is not a trailing form
+ # FIX for git #124: we have to skip this check because
+ # the 'gather' keyword of List::Gather can operate on
+ # a full statement, so it isn't possible to be sure
+ # this is a trailing form.
+ if ( 0 && !$want_brace ) {
$self->warning(
"syntax error at ') {', unexpected '{' after closing ')' of a trailing '$last_nonblank_token'\n"
);
use warnings;
use Carp;
use English qw( -no_match_vars );
-our $VERSION = '20230909';
+our $VERSION = '20230912';
use Perl::Tidy::VerticalAligner::Alignment;
use Perl::Tidy::VerticalAligner::Line;
{ #<<< A non-indenting brace
-our $VERSION = '20230909';
+our $VERSION = '20230912';
sub new {
my ( $class, $rarg ) = @_;
use strict;
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20230909';
+our $VERSION = '20230912';
sub AUTOLOAD {
--- /dev/null
+sub git124 {
+ return [
+ gather while ( my $foo = $bar->foobar )
+ {
+ ...;
+ }
+ ];
+}
--- /dev/null
+sub git124 {
+ return [
+ gather while ( my $foo = $bar->foobar )
+ {
+ ...;
+ }
+ ];
+}
../snippets28.t xbt.xbt3
../snippets28.t lrt.def
../snippets28.t lrt.lrt
+../snippets28.t ame.ame
+../snippets28.t ame.def
../snippets3.t ce_wn1.ce_wn
../snippets3.t ce_wn1.def
../snippets3.t colin.colin
../snippets9.t rt98902.def
../snippets9.t rt98902.rt98902
../snippets9.t rt99961.def
-../snippets28.t ame.ame
-../snippets28.t ame.def
+../snippets28.t git124.def
#13 lrt.lrt
#14 ame.ame
#15 ame.def
+#16 git124.def
# To locate test #13 you can search for its name or the string '#13'
print "Would need: @DepList\n" if ( @DepList and !$Quiet );
print "RPM Output:\n" unless $Quiet;
print join( "\n", @RPMOutput ) . "\n" unless $Quiet;
+----------
+
+ 'git124' => <<'----------',
+sub git124 {
+ return [
+ gather while ( my $foo = $bar->foobar )
+ {
+ ...;
+ }
+ ];
+}
----------
'lrt' => <<'----------',
elsif ( $level == 2 ) { $val = $global{'chapter'} }
#15...........
},
+
+ 'git124.def' => {
+ source => "git124",
+ params => "def",
+ expect => <<'#16...........',
+sub git124 {
+ return [
+ gather while ( my $foo = $bar->foobar )
+ {
+ ...;
+ }
+ ];
+}
+#16...........
+ },
};
my $ntests = 0 + keys %{$rtests};