From 542f65424e21186460ea47884a91d1183a3ec447 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Wed, 24 Mar 2021 10:01:09 +0000 Subject: [PATCH] Update to 1.140 - New upstream release 1.140 - Subroutines::RequireFinalReturn now lets you specify a terminal_methods parameter to specify methods that should be seen as terminal; this is like the terminal_funcs parameter, but for methods (GH#920) - Removed an extra /x in RequireInterpolationOfMetachars.pm that caused deprecation warnings in Perl 5.22 and higher (GH#822) - Documentation::RequirePackageMatchesPodName now recognizes the package name if it's in 'I<>' or 'B<>' markup (GH#913) - Use %license unconditionally --- ...pell-check-tool-from-aspell-to-hunsp.patch | 82 ++++++------------- Perl-Critic-1.138-gh911.patch | 20 ----- perl-Perl-Critic.spec | 25 +++--- sources | 2 +- 4 files changed, 40 insertions(+), 89 deletions(-) delete mode 100644 Perl-Critic-1.138-gh911.patch diff --git a/0001-Change-default-spell-check-tool-from-aspell-to-hunsp.patch b/0001-Change-default-spell-check-tool-from-aspell-to-hunsp.patch index ced33c5..1a03836 100644 --- a/0001-Change-default-spell-check-tool-from-aspell-to-hunsp.patch +++ b/0001-Change-default-spell-check-tool-from-aspell-to-hunsp.patch @@ -1,4 +1,4 @@ -From ff93fae7cfc2e097c3b37947fd1501bab25481fc Mon Sep 17 00:00:00 2001 +From 3fe891edfb8957d6f89f16cb9bca7e72a7811572 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Fri, 21 Jul 2017 11:50:35 +0100 Subject: [PATCH] Change default spell check tool from aspell to hunspell @@ -17,11 +17,9 @@ problems with ASCII apostrophes, thus flagging errors for words like "doesn't", "isn't" etc., which makes 1.2.12 pretty much a minimum version requirement if incorporating this change. --- - .travis.yml | 4 ++-- bin/perlcritic | 2 +- .../BuiltinFunctions/ProhibitBooleanGrep.pm | 2 ++ .../BuiltinFunctions/ProhibitLvalueSubstr.pm | 2 +- - .../BuiltinFunctions/ProhibitShiftRef.pm | 2 +- .../Policy/Documentation/PodSpelling.pm | 20 +++++++++---------- .../RequireCheckingReturnValueOfEval.pm | 2 +- .../Policy/Modules/RequireBarewordIncludes.pm | 2 ++ @@ -38,25 +36,10 @@ minimum version requirement if incorporating this change. lib/Perl/Critic/Utils/PPI.pm | 2 +- t/20_policy_pod_spelling.t | 4 ++-- xt/40_perlcriticrc-code | 2 +- - 21 files changed, 41 insertions(+), 23 deletions(-) + 19 files changed, 38 insertions(+), 20 deletions(-) -diff --git a/.travis.yml b/.travis.yml -index c907085f..9a01a667 100644 ---- a/.travis.yml -+++ b/.travis.yml -@@ -2,8 +2,8 @@ - addons: - apt: - packages: -- - aspell -- - aspell-en -+ - hunspell -+ - hunspell-en-us - language: perl - perl: - # blead and dev don't play nicely with Module::Build diff --git a/bin/perlcritic b/bin/perlcritic -index bff0b3ad..6fc3dd05 100644 +index e96ca78c..ddc73558 100644 --- a/bin/perlcritic +++ b/bin/perlcritic @@ -30,7 +30,7 @@ __END__ @@ -69,7 +52,7 @@ index bff0b3ad..6fc3dd05 100644 =head1 NAME diff --git a/lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitBooleanGrep.pm b/lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitBooleanGrep.pm -index 1a45f86b..eb7263c7 100644 +index c39ecd6e..32312c12 100644 --- a/lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitBooleanGrep.pm +++ b/lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitBooleanGrep.pm @@ -86,6 +86,8 @@ __END__ @@ -82,7 +65,7 @@ index 1a45f86b..eb7263c7 100644 Perl::Critic::Policy::BuiltinFunctions::ProhibitBooleanGrep - Use C instead of C in boolean context. diff --git a/lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitLvalueSubstr.pm b/lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitLvalueSubstr.pm -index 1b011623..3c903e91 100644 +index 0a77ff00..ddba991d 100644 --- a/lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitLvalueSubstr.pm +++ b/lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitLvalueSubstr.pm @@ -64,7 +64,7 @@ __END__ @@ -94,21 +77,8 @@ index 1b011623..3c903e91 100644 =head1 NAME -diff --git a/lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitShiftRef.pm b/lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitShiftRef.pm -index e9ce1990..ff612557 100644 ---- a/lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitShiftRef.pm -+++ b/lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitShiftRef.pm -@@ -94,7 +94,7 @@ modules. - =head2 Background - - Often, C<\shift> is used to create references that act much like an alias. By --creating an ‘alias’ that is named, the code becomes more readable. For example, -+creating an 'alias' that is named, the code becomes more readable. For example, - - sub routine { - my $longstring = \shift; diff --git a/lib/Perl/Critic/Policy/Documentation/PodSpelling.pm b/lib/Perl/Critic/Policy/Documentation/PodSpelling.pm -index 41a59f92..e6464e9a 100644 +index 0e133176..98e39f21 100644 --- a/lib/Perl/Critic/Policy/Documentation/PodSpelling.pm +++ b/lib/Perl/Critic/Policy/Documentation/PodSpelling.pm @@ -39,7 +39,7 @@ sub supported_parameters { @@ -134,8 +104,8 @@ index 41a59f92..e6464e9a 100644 + close $speller_out_fh or throw_generic "Failed to close handle to spelling program: $OS_ERROR"; - for (@words) { -@@ -326,11 +326,11 @@ set a global list of spelling exceptions. To do this, put entries in + chomp @words; +@@ -324,11 +324,11 @@ set a global list of spelling exceptions. To do this, put entries in a F<.perlcriticrc> file like this: [Documentation::PodSpelling] @@ -149,7 +119,7 @@ index 41a59f92..e6464e9a 100644 shell command. We parse the individual arguments via L so feel free to use quotes around your arguments. If the executable path is an absolute file name, it -@@ -360,13 +360,13 @@ together into a single list of exemptions. +@@ -358,13 +358,13 @@ together into a single list of exemptions. A spell checking program is not included with Perl::Critic. @@ -168,7 +138,7 @@ index 41a59f92..e6464e9a 100644 Pod::Spell->new()->parse_from_file("lib/Your/Module.pm")' >> to see what is actually being checked for spelling. diff --git a/lib/Perl/Critic/Policy/ErrorHandling/RequireCheckingReturnValueOfEval.pm b/lib/Perl/Critic/Policy/ErrorHandling/RequireCheckingReturnValueOfEval.pm -index f5ed7526..14438cc1 100644 +index 1144d6b0..924bfe2c 100644 --- a/lib/Perl/Critic/Policy/ErrorHandling/RequireCheckingReturnValueOfEval.pm +++ b/lib/Perl/Critic/Policy/ErrorHandling/RequireCheckingReturnValueOfEval.pm @@ -317,7 +317,7 @@ __END__ @@ -181,7 +151,7 @@ index f5ed7526..14438cc1 100644 =head1 NAME diff --git a/lib/Perl/Critic/Policy/Modules/RequireBarewordIncludes.pm b/lib/Perl/Critic/Policy/Modules/RequireBarewordIncludes.pm -index 9cdcb29d..3da67de7 100644 +index d570f207..934964b6 100644 --- a/lib/Perl/Critic/Policy/Modules/RequireBarewordIncludes.pm +++ b/lib/Perl/Critic/Policy/Modules/RequireBarewordIncludes.pm @@ -46,6 +46,8 @@ __END__ @@ -194,7 +164,7 @@ index 9cdcb29d..3da67de7 100644 Perl::Critic::Policy::Modules::RequireBarewordIncludes - Write C instead of C. diff --git a/lib/Perl/Critic/Policy/RegularExpressions/ProhibitCaptureWithoutTest.pm b/lib/Perl/Critic/Policy/RegularExpressions/ProhibitCaptureWithoutTest.pm -index 193d8a2e..ddadae5f 100644 +index 8dc04937..5d971e1a 100644 --- a/lib/Perl/Critic/Policy/RegularExpressions/ProhibitCaptureWithoutTest.pm +++ b/lib/Perl/Critic/Policy/RegularExpressions/ProhibitCaptureWithoutTest.pm @@ -307,6 +307,8 @@ __END__ @@ -207,7 +177,7 @@ index 193d8a2e..ddadae5f 100644 Perl::Critic::Policy::RegularExpressions::ProhibitCaptureWithoutTest - Capture variable used outside conditional. diff --git a/lib/Perl/Critic/Policy/RegularExpressions/ProhibitComplexRegexes.pm b/lib/Perl/Critic/Policy/RegularExpressions/ProhibitComplexRegexes.pm -index fe3bb7cd..46090ef5 100644 +index 647ffb4a..a6ce7af6 100644 --- a/lib/Perl/Critic/Policy/RegularExpressions/ProhibitComplexRegexes.pm +++ b/lib/Perl/Critic/Policy/RegularExpressions/ProhibitComplexRegexes.pm @@ -99,7 +99,7 @@ __END__ @@ -220,7 +190,7 @@ index fe3bb7cd..46090ef5 100644 =head1 NAME diff --git a/lib/Perl/Critic/Policy/RegularExpressions/ProhibitFixedStringMatches.pm b/lib/Perl/Critic/Policy/RegularExpressions/ProhibitFixedStringMatches.pm -index ce4d8c07..f8cce2fe 100644 +index 63704bad..dc9e1778 100644 --- a/lib/Perl/Critic/Policy/RegularExpressions/ProhibitFixedStringMatches.pm +++ b/lib/Perl/Critic/Policy/RegularExpressions/ProhibitFixedStringMatches.pm @@ -82,6 +82,8 @@ __END__ @@ -233,10 +203,10 @@ index ce4d8c07..f8cce2fe 100644 Perl::Critic::Policy::RegularExpressions::ProhibitFixedStringMatches - Use C or hash instead of fixed-pattern regexps. diff --git a/lib/Perl/Critic/Policy/RegularExpressions/ProhibitSingleCharAlternation.pm b/lib/Perl/Critic/Policy/RegularExpressions/ProhibitSingleCharAlternation.pm -index 5d8de1ba..d4a4d036 100644 +index e1d8ee51..6bc416d7 100644 --- a/lib/Perl/Critic/Policy/RegularExpressions/ProhibitSingleCharAlternation.pm +++ b/lib/Perl/Critic/Policy/RegularExpressions/ProhibitSingleCharAlternation.pm -@@ -83,6 +83,8 @@ __END__ +@@ -82,6 +82,8 @@ __END__ =pod @@ -246,7 +216,7 @@ index 5d8de1ba..d4a4d036 100644 Perl::Critic::Policy::RegularExpressions::ProhibitSingleCharAlternation - Use C<[abc]> instead of C. diff --git a/lib/Perl/Critic/Policy/RegularExpressions/ProhibitUnusedCapture.pm b/lib/Perl/Critic/Policy/RegularExpressions/ProhibitUnusedCapture.pm -index 1f27bdb6..2e16b6a4 100644 +index 5cecad63..4a357ebd 100644 --- a/lib/Perl/Critic/Policy/RegularExpressions/ProhibitUnusedCapture.pm +++ b/lib/Perl/Critic/Policy/RegularExpressions/ProhibitUnusedCapture.pm @@ -715,7 +715,7 @@ __END__ @@ -259,7 +229,7 @@ index 1f27bdb6..2e16b6a4 100644 =head1 NAME diff --git a/lib/Perl/Critic/Policy/RegularExpressions/ProhibitUnusualDelimiters.pm b/lib/Perl/Critic/Policy/RegularExpressions/ProhibitUnusualDelimiters.pm -index 1537726e..19c06b76 100644 +index cfdce6be..a69e064c 100644 --- a/lib/Perl/Critic/Policy/RegularExpressions/ProhibitUnusualDelimiters.pm +++ b/lib/Perl/Critic/Policy/RegularExpressions/ProhibitUnusualDelimiters.pm @@ -77,6 +77,8 @@ __END__ @@ -272,7 +242,7 @@ index 1537726e..19c06b76 100644 Perl::Critic::Policy::RegularExpressions::ProhibitUnusualDelimiters - Use only C or C<{}> to delimit regexps. diff --git a/lib/Perl/Critic/Policy/RegularExpressions/RequireBracesForMultiline.pm b/lib/Perl/Critic/Policy/RegularExpressions/RequireBracesForMultiline.pm -index cf14cdf7..f87f46d6 100644 +index c3a063ca..ac8344f3 100644 --- a/lib/Perl/Critic/Policy/RegularExpressions/RequireBracesForMultiline.pm +++ b/lib/Perl/Critic/Policy/RegularExpressions/RequireBracesForMultiline.pm @@ -77,6 +77,8 @@ __END__ @@ -285,7 +255,7 @@ index cf14cdf7..f87f46d6 100644 Perl::Critic::Policy::RegularExpressions::RequireBracesForMultiline - Use C<{> and C<}> to delimit multi-line regexps. diff --git a/lib/Perl/Critic/Policy/Variables/ProhibitPunctuationVars.pm b/lib/Perl/Critic/Policy/Variables/ProhibitPunctuationVars.pm -index 5f9e25ca..9ab0c802 100644 +index f136daf8..953ddd6c 100644 --- a/lib/Perl/Critic/Policy/Variables/ProhibitPunctuationVars.pm +++ b/lib/Perl/Critic/Policy/Variables/ProhibitPunctuationVars.pm @@ -367,6 +367,8 @@ __END__ @@ -298,7 +268,7 @@ index 5f9e25ca..9ab0c802 100644 Perl::Critic::Policy::Variables::ProhibitPunctuationVars - Write C<$EVAL_ERROR> instead of C<$@>. diff --git a/lib/Perl/Critic/Policy/Variables/RequireLexicalLoopIterators.pm b/lib/Perl/Critic/Policy/Variables/RequireLexicalLoopIterators.pm -index 6632c996..d04664ba 100644 +index 6c3b0842..3be56443 100644 --- a/lib/Perl/Critic/Policy/Variables/RequireLexicalLoopIterators.pm +++ b/lib/Perl/Critic/Policy/Variables/RequireLexicalLoopIterators.pm @@ -66,7 +66,7 @@ __END__ @@ -311,7 +281,7 @@ index 6632c996..d04664ba 100644 =head1 NAME diff --git a/lib/Perl/Critic/Utils.pm b/lib/Perl/Critic/Utils.pm -index 38b91ea6..0813d310 100644 +index 43833170..ef023c82 100644 --- a/lib/Perl/Critic/Utils.pm +++ b/lib/Perl/Critic/Utils.pm @@ -1397,6 +1397,8 @@ __END__ @@ -324,7 +294,7 @@ index 38b91ea6..0813d310 100644 Perl::Critic::Utils - General utility subroutines and constants for Perl::Critic and derivative distributions. diff --git a/lib/Perl/Critic/Utils/PPI.pm b/lib/Perl/Critic/Utils/PPI.pm -index 0c58081d..376087d7 100644 +index 5700d3f4..aeb31cf4 100644 --- a/lib/Perl/Critic/Utils/PPI.pm +++ b/lib/Perl/Critic/Utils/PPI.pm @@ -235,7 +235,7 @@ __END__ @@ -337,7 +307,7 @@ index 0c58081d..376087d7 100644 =head1 NAME diff --git a/t/20_policy_pod_spelling.t b/t/20_policy_pod_spelling.t -index 4e782bd7..71d6c620 100644 +index 3d97d80c..a3bbf72c 100644 --- a/t/20_policy_pod_spelling.t +++ b/t/20_policy_pod_spelling.t @@ -58,10 +58,10 @@ $code = <<'END_PERL'; @@ -354,7 +324,7 @@ index 4e782bd7..71d6c620 100644 if ( ! eval { ! pcritique($policy, \$code) } ) { skip 'Test environment is not English', $NUMBER_OF_TESTS; diff --git a/xt/40_perlcriticrc-code b/xt/40_perlcriticrc-code -index 25d5a933..b488284e 100644 +index c63df2ca..b0df69f9 100644 --- a/xt/40_perlcriticrc-code +++ b/xt/40_perlcriticrc-code @@ -17,7 +17,7 @@ strict = 1 @@ -367,5 +337,5 @@ index 25d5a933..b488284e 100644 [Documentation::RequirePodSections] -- -2.21.0 +2.30.2 diff --git a/Perl-Critic-1.138-gh911.patch b/Perl-Critic-1.138-gh911.patch deleted file mode 100644 index b16a290..0000000 --- a/Perl-Critic-1.138-gh911.patch +++ /dev/null @@ -1,20 +0,0 @@ -This is a workaround for https://github.com/Perl-Critic/Perl-Critic/issues/911 - -This workaround causes no change in behaviour, but a long-term fix may include -making "isa" a special case like import, AUTOLOAD, and DESTROY, which are -commonly overridden. That would be a behaviour change. - -The "## no critic" pragma wouldn't be needed prior to Perl 5.32, hence the -additional reference to Miscellanea::ProhibitUselessNoCritic. - ---- lib/Perl/Critic/Document.pm -+++ lib/Perl/Critic/Document.pm -@@ -137,7 +137,7 @@ sub ppi_document { - - #----------------------------------------------------------------------------- - --sub isa { -+sub isa { ## no critic (Subroutines::ProhibitBuiltinHomonyms, Miscellanea::ProhibitUselessNoCritic) - my ($self, @args) = @_; - return $self->SUPER::isa(@args) - || ( (ref $self) && $self->{_doc} && $self->{_doc}->isa(@args) ); diff --git a/perl-Perl-Critic.spec b/perl-Perl-Critic.spec index 911c377..1ec12e0 100644 --- a/perl-Perl-Critic.spec +++ b/perl-Perl-Critic.spec @@ -6,15 +6,14 @@ %endif Name: perl-Perl-Critic -Version: 1.138 -Release: 7%{?dist} +Version: 1.140 +Release: 1%{?dist} Summary: Critique Perl source code for best-practices License: GPL+ or Artistic URL: https://metacpan.org/release/Perl-Critic Source0: https://cpan.metacpan.org/modules/by-module/Perl/Perl-Critic-%{version}.tar.gz Patch0: 0001-Change-default-spell-check-tool-from-aspell-to-hunsp.patch Patch3: Perl-Critic-1.136-ppidump-shellbang.patch -Patch4: Perl-Critic-1.138-gh911.patch BuildArch: noarch # Build process @@ -133,11 +132,6 @@ of Perl code were mixed directly in the test script. That sucked. # Fix shellbang in ppidump tool %patch3 -# Workaround for 'Subroutine name is a homonym for builtin function isa' -# https://github.com/Perl-Critic/Perl-Critic/issues/911 -# https://bugzilla.redhat.com/show_bug.cgi?id=1852437 -%patch4 - # Drop exec bits from samples/docs to avoid dependency bloat find tools examples -type f -exec chmod -c -x {} ';' @@ -157,11 +151,7 @@ LC_ALL=en_US ./Build test %endif %files -%if 0%{?_licensedir:1} %license LICENSE -%else -%doc LICENSE -%endif %doc Changes CONTRIBUTING.md README TODO.pod examples/ extras/ tools/ %{_bindir}/perlcritic %{perl_vendorlib}/Perl/ @@ -173,6 +163,17 @@ LC_ALL=en_US ./Build test %{_mandir}/man3/Test::Perl::Critic::Policy.3* %changelog +* Wed Mar 24 2021 Paul Howarth - 1.140-1 +- Update to 1.140 + - Subroutines::RequireFinalReturn now lets you specify a terminal_methods + parameter to specify methods that should be seen as terminal; this is like + the terminal_funcs parameter, but for methods (GH#920) + - Removed an extra /x in RequireInterpolationOfMetachars.pm that caused + deprecation warnings in Perl 5.22 and higher (GH#822) + - Documentation::RequirePackageMatchesPodName now recognizes the package + name if it's in 'I<>' or 'B<>' markup (GH#913) +- Use %%license unconditionally + * Wed Jan 27 2021 Fedora Release Engineering - 1.138-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index a88fb17..7c8b1b3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Perl-Critic-1.138.tar.gz) = e36c44dc6ab67cdb0014c6b575238e3c54d4ffa506082df66f5e44ec0137111945f3a1196f2902e7c363c9ea10f08bfc8285b75d0af32080d9603ae7b28a4df7 +SHA512 (Perl-Critic-1.140.tar.gz) = 46afc8260d2b500edbb29836be993f065270ed9ffa6aa00611a980b294025b794286bc820afeabb94b7d1cdd9bfb4e715e44e466fb0340cb9d938e031b54a6f0