From b8cc7ee9fc829cae5ed0449836d974664a24dce3 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Mon, 29 Apr 2019 13:15:43 +0100 Subject: [PATCH] =?UTF-8?q?Add=20workaround=20for=20PPI=20=E2=89=A5=201.26?= =?UTF-8?q?2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- perl-Perl-Critic-1.132-PPI.patch | 11 +++++++++++ perl-Perl-Critic.spec | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/perl-Perl-Critic-1.132-PPI.patch b/perl-Perl-Critic-1.132-PPI.patch index 3a8ca9e..64226b2 100644 --- a/perl-Perl-Critic-1.132-PPI.patch +++ b/perl-Perl-Critic-1.132-PPI.patch @@ -1,3 +1,14 @@ +--- lib/Perl/Critic/Command.pm ++++ lib/Perl/Critic/Command.pm +@@ -187,7 +187,7 @@ sub _get_input { + + # Reading code from STDIN. All the code is slurped into + # a string. PPI will barf if the string is just whitespace. +- my $code_string = do { local $RS = undef; }; ++ my $code_string = do { local $RS = undef; }; ## no critic (InputOutput::ProhibitExplicitStdin) + + # Notice if STDIN was closed (pipe error, etc) + if ( ! defined $code_string ) { --- t/05_utils.t +++ t/05_utils.t @@ -418,7 +418,7 @@ sub test_parse_arg_list { diff --git a/perl-Perl-Critic.spec b/perl-Perl-Critic.spec index 6c51d56..408e634 100644 --- a/perl-Perl-Critic.spec +++ b/perl-Perl-Critic.spec @@ -1,6 +1,6 @@ Name: perl-Perl-Critic Version: 1.132 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Critique Perl source code for best-practices License: GPL+ or Artistic URL: https://metacpan.org/release/Perl-Critic @@ -158,6 +158,9 @@ LC_ALL=en_US ./Build %{!?perl_bootstrap:author}test %{_mandir}/man3/Test::Perl::Critic::Policy.3* %changelog +* Mon Apr 29 2019 Paul Howarth - 1.132-8 +- Add workaround for PPI ≥ 1.262 + * Fri Apr 26 2019 Paul Howarth - 1.132-7 - Add workaround for PPI ≥ 1.250 https://github.com/Perl-Critic/Perl-Critic/issues/858