From: Steve Hancock Date: Fri, 13 May 2022 05:00:26 +0000 (-0700) Subject: fix problem with Perl version 5.14 X-Git-Tag: 20220613~28 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b72354f79183e404778906c0833b2f8c054921ef;p=perltidy.git fix problem with Perl version 5.14 --- diff --git a/.perlcriticrc b/.perlcriticrc index 779fbe00..6cd6b6bc 100644 --- a/.perlcriticrc +++ b/.perlcriticrc @@ -94,6 +94,10 @@ verbose = %f: [%p] %m at line %l, column %c.\n # Following is a list of policies to be skipped for severity=2: #-------------------------------------------------------------- +# Following this policy caused a parsing error in Perl version 5.14 at +# file test operators. +[-BuiltinFunctions::ProhibitUselessTopic] + # Do not change any debugged regular expressions without good reason [-RegularExpressions::RequireDotMatchAnything] [-RegularExpressions::RequireLineBoundaryMatching] diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 76905979..9e297589 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -946,8 +946,7 @@ EOM @ARGV = map { $_->[0] } sort { $a->[1] <=> $b->[1] } - map { [ $_, -e ? -s : 0 ] } @ARGV; - ##map { [ $_, -e $_ ? -s $_ : 0 ] } @ARGV; + map { [ $_, -e $_ ? -s $_ : 0 ] } @ARGV; } my $number_of_files = @ARGV;