From 04e00bf7ab907c90112adcbd30b8af0bc36a69ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com> Date: Fri, 12 Jun 2015 13:32:30 +0200 Subject: Work around an incompatibility with Perl 5.22
diff --git a/B-Lint-1.20-Skip-a-bare-sub-test.patch b/B-Lint-1.20-Skip-a-bare-sub-test.patch new file mode 100644 index 0000000..c74e2ab --- /dev/null +++ b/B-Lint-1.20-Skip-a-bare-sub-test.patch @@ -0,0 +1,68 @@ +From d350b6338066d2563b4abacf1eb7da56c5264b22 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com> +Date: Fri, 12 Jun 2015 13:27:07 +0200 +Subject: [PATCH] Skip a bare-sub test +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Perl 5.22 optimization causes B::Lint not to recognize $a{b} for +bare-sub check. This patch document this deficency and skips a test +for it. + +Signed-off-by: Petr Písař <ppi...@redhat.com> +--- + lib/B/Lint.pm | 4 ++++ + t/lint.t | 11 +++++++++-- + 2 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/lib/B/Lint.pm b/lib/B/Lint.pm +index 1f5098f..7291b18 100644 +--- a/lib/B/Lint.pm ++++ b/lib/B/Lint.pm +@@ -85,6 +85,10 @@ trap are: + + Neither of these will do what a naive user would expect. + ++Notice: Perl 5.22.0 does not report C<foo> in C<$b{foo}> as BARE token ++anymore. Therefore L<B::Lint> test is not reliable here. See ++L<CPAN RT#101115|https://rt.cpan.org/Public/Bug/Display.html?id=101115>. ++ + =item B<dollar-underscore> + + This option warns whenever C<$_> is used either explicitly anywhere or +diff --git a/t/lint.t b/t/lint.t +index 7317b1d..93255d9 100644 +--- a/t/lint.t ++++ b/t/lint.t +@@ -14,7 +14,7 @@ BEGIN { + use strict; + use warnings; + +-plan tests => 29; ++plan tests => 30; + + # Runs a separate perl interpreter with the appropriate lint options + # turned on +@@ -116,10 +116,17 @@ RESULT + + runlint 'bare-subs', 'sub bare(){1};$x=bare', ''; + +-runlint 'bare-subs', 'sub bare(){1}; $x=[bare=>0]; $x=$y{bare}', <<'RESULT'; ++runlint 'bare-subs', 'sub bare(){1}; $x=[bare=>0]', <<'RESULT'; + Bare sub name 'bare' interpreted as string at -e line 1 ++RESULT ++ ++SKIP: { ++ skip 'Perl 5.22 stopped marking $hash{bare} as BARE word, CPAN RT#101115', ++ 1, if $] >= 5.022; ++ runlint 'bare-subs', 'sub bare(){1}; $x=$y{bare}', <<'RESULT'; + Bare sub name 'bare' interpreted as string at -e line 1 + RESULT ++} + + { + +-- +2.1.0 + diff --git a/perl-B-Lint.spec b/perl-B-Lint.spec index 05afde3..2461a78 100644 --- a/perl-B-Lint.spec +++ b/perl-B-Lint.spec @@ -1,11 +1,13 @@ Name: perl-B-Lint Version: 1.20 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Perl lint License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/B-Lint/ Source0: http://www.cpan.org/authors/id/R/RJ/RJBS/B-Lint-%{version}.tar.gz +# Work around for Perl 5.22, bug #1231112, CPAN RT#101115 +Patch0: B-Lint-1.20-Skip-a-bare-sub-test.patch BuildArch: noarch BuildRequires: perl BuildRequires: perl(ExtUtils::MakeMaker) @@ -39,6 +41,7 @@ for C programs. %prep %setup -q -n B-Lint-%{version} +%patch0 -p1 # Install into architercture-agnostic path, CPAN RT #83049 sed -i '/PM *=>/,/}/d' Makefile.PL @@ -60,6 +63,9 @@ make test %{_mandir}/man3/* %changelog +* Fri Jun 12 2015 Petr Pisar <ppi...@redhat.com> - 1.20-4 +- Work around an incompatibility with Perl 5.22 (bug #1231112) + * Sat Jun 06 2015 Jitka Plesnikova <jples...@redhat.com> - 1.20-3 - Perl 5.22 rebuild -- cgit v0.10.2 http://pkgs.fedoraproject.org/cgit/perl-B-Lint.git/commit/?h=master&id=04e00bf7ab907c90112adcbd30b8af0bc36a69ac -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/perl-devel