jplesnik pushed to perl-constant-tiny (master). "Fixed tests (CPAN RT#99169, RT#103958)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue May 5 13:13:12 UTC 2015


>From cfc7c9c16bd768d52d777e792a2990dc56af9d3e Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jplesnik at redhat.com>
Date: Tue, 5 May 2015 15:12:56 +0200
Subject: Fixed tests (CPAN RT#99169, RT#103958)


diff --git a/constant-tiny-1.01-RT103958.patch b/constant-tiny-1.01-RT103958.patch
new file mode 100644
index 0000000..b115552
--- /dev/null
+++ b/constant-tiny-1.01-RT103958.patch
@@ -0,0 +1,28 @@
+From 1e8b5370f159e1235dd8fd331d1efcd4be73fd71 Mon Sep 17 00:00:00 2001
+From: Slaven Rezic <slaven at rezic.de>
+Date: Sat, 25 Apr 2015 09:16:15 +0200
+Subject: [PATCH] Constants from lexical variables potentially modified
+ elsewhere are deprecated
+
+Make sure that the new deprecation warning does not happen anymore.
+
+This fixes https://rt.cpan.org/Ticket/Display.html?id=103958
+---
+ lib/constant/tiny.pm | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/constant/tiny.pm b/lib/constant/tiny.pm
+index 594eaaa..f9fc72b 100644
+--- a/lib/constant/tiny.pm
++++ b/lib/constant/tiny.pm
+@@ -68,6 +68,7 @@ my $normal_constant_name = qr/^_?[A-Za-z0-9][A-Za-z0-9_]+\z/;
+                 $symtab->{$name} = \$scalar;
+                 ++$flush_mro;
+             } else {
++		my $scalar = $scalar;
+                 *$full_name = sub () { $scalar };
+             }
+         } elsif (@_) {
+-- 
+2.1.2
+
diff --git a/constant-tiny-1.01-RT99169-Fix-test.patch b/constant-tiny-1.01-RT99169-Fix-test.patch
new file mode 100644
index 0000000..da5a335
--- /dev/null
+++ b/constant-tiny-1.01-RT99169-Fix-test.patch
@@ -0,0 +1,23 @@
+diff -rup constant-tiny-1.01-iBj9Vy-orig/t/constant.t constant-tiny-1.01-iBj9Vy/t/constant.t
+--- constant-tiny-1.01-iBj9Vy-orig/t/constant.t	2014-09-27 09:42:40.000000000 -0700
++++ constant-tiny-1.01-iBj9Vy/t/constant.t	2014-09-27 09:43:03.000000000 -0700
+@@ -10,7 +10,7 @@ END { @warnings && print STDERR join "\n
+ 
+ 
+ use strict;
+-use Test::More tests => 95;
++use Test::More tests => 94;
+ my $TB = Test::More->builder;
+ 
+ use constant PI		=> 4 * atan2 1, 1;
+@@ -120,10 +120,6 @@ print $output CCODE->($curr_test+4);
+ 
+ $TB->current_test($curr_test+4);
+ 
+-eval q{ CCODE->{foo} };
+-ok scalar($@ =~ /^Constant is not a HASH/);
+-
+-
+ # Allow leading underscore
+ use constant _PRIVATE => 47;
+ is _PRIVATE, 47;
diff --git a/perl-constant-tiny.spec b/perl-constant-tiny.spec
index efaf634..bd39642 100644
--- a/perl-constant-tiny.spec
+++ b/perl-constant-tiny.spec
@@ -1,11 +1,15 @@
 Name:           perl-constant-tiny
 Version:        1.01
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Perl pragma to declare constants
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/constant-tiny/
 Source0:        http://www.cpan.org/authors/id/S/SA/SAPER/constant-tiny-%{version}.tar.gz
+# Compile-time check that was removed from Perl 5.21.x
+Patch0:         constant-tiny-1.01-RT99169-Fix-test.patch
+# New deprecation warning causes failures in the test suite
+Patch1:         constant-tiny-1.01-RT103958.patch
 BuildArch:      noarch
 BuildRequires:  perl
 BuildRequires:  perl(Module::Build)
@@ -29,6 +33,8 @@ about valid names.
 
 %prep
 %setup -q -n constant-tiny-%{version}
+%patch0 -p1
+%patch1 -p1
 
 %build
 perl Build.PL installdirs=vendor
@@ -47,6 +53,9 @@ perl Build.PL installdirs=vendor
 %{_mandir}/man3/*
 
 %changelog
+* Tue May 05 2015 Jitka Plesnikova <jplesnik at redhat.com> - 1.01-6
+- Fixed tests (CPAN RT#99169, RT#103958)
+
 * Wed Aug 27 2014 Jitka Plesnikova <jplesnik at redhat.com> - 1.01-5
 - Perl 5.20 rebuild
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/perl-constant-tiny.git/commit/?h=master&id=cfc7c9c16bd768d52d777e792a2990dc56af9d3e


More information about the perl-devel mailing list