Add workaround for PPI ≥ 1.250

https://github.com/Perl-Critic/Perl-Critic/issues/858
This commit is contained in:
Paul Howarth 2019-04-26 12:51:48 +01:00
parent e8cf85115e
commit 4c3b785b46
2 changed files with 22 additions and 2 deletions

View File

@ -0,0 +1,11 @@
--- t/05_utils.t
+++ t/05_utils.t
@@ -418,7 +418,7 @@ sub test_parse_arg_list {
[
q/foo( { bar() }, {}, 'blah' )/
=> [
- ' { bar() }',
+ [ '{ bar() }' ],
[ qw< {} > ],
[ q<'blah'> ],
],

View File

@ -1,11 +1,12 @@
Name: perl-Perl-Critic
Version: 1.132
Release: 6%{?dist}
Release: 7%{?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/authors/id/P/PE/PETDANCE/Perl-Critic-%{version}.tar.gz
Patch0: 0001-Change-default-spell-check-tool-from-aspell-to-hunsp.patch
Patch1: perl-Perl-Critic-1.132-PPI.patch
BuildArch: noarch
# Build process
@ -45,7 +46,7 @@ BuildRequires: perl(Pod::PlainText)
BuildRequires: perl(Pod::Select)
BuildRequires: perl(Pod::Spell) >= 1
BuildRequires: perl(Pod::Usage)
BuildRequires: perl(PPI) >= 1.224
BuildRequires: perl(PPI) >= 1.250
BuildRequires: perl(PPIx::QuoteLike)
BuildRequires: perl(PPIx::Regexp) >= 0.010
BuildRequires: perl(PPIx::Utilities::Node)
@ -122,6 +123,10 @@ of Perl code were mixed directly in the test script. That sucked.
# Switch spell checker tool from aspell to hunspell
%patch0 -p1
# Workaround for PPI ≥ 1.250
# https://github.com/Perl-Critic/Perl-Critic/issues/858
%patch1
# Drop exec bits from samples/docs to avoid dependency bloat
find tools examples -type f -exec chmod -c -x {} ';'
@ -153,6 +158,10 @@ LC_ALL=en_US ./Build %{!?perl_bootstrap:author}test
%{_mandir}/man3/Test::Perl::Critic::Policy.3*
%changelog
* Fri Apr 26 2019 Paul Howarth <paul@city-fan.org> - 1.132-7
- Add workaround for PPI 1.250
https://github.com/Perl-Critic/Perl-Critic/issues/858
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.132-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild