diff --git a/Test-Modern-0.006-warnings.patch b/Test-Modern-0.006-warnings.patch new file mode 100644 index 0000000..a3515b7 --- /dev/null +++ b/Test-Modern-0.006-warnings.patch @@ -0,0 +1,39 @@ +diff --git a/lib/Test/Modern.pm b/lib/Test/Modern.pm +index 5e3e7b3..d2896b3 100644 +--- a/lib/Test/Modern.pm ++++ b/lib/Test/Modern.pm +@@ -235,6 +235,9 @@ sub _setup_inc + + return unless exists($opts->{into_file}); + ++ # Workaround for File::Spec on legacy Redhat?? ++ local $SIG{__WARN__} = 'IGNORE'; ++ + my $dir = do { + my @tmp = 'File::Spec'->splitpath($opts->{into_file}); + pop @tmp; +From 2f95fb411e3ce20f72b2d48cdb94cc9a9e6140aa Mon Sep 17 00:00:00 2001 +From: Toby Inkster +Date: Fri, 4 Apr 2014 19:35:45 +0100 +Subject: [PATCH] oops; IGNORE is not supported by __WARN__ signal + +--- + lib/Test/Modern.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/Test/Modern.pm b/lib/Test/Modern.pm +index d2896b3..7a9de54 100644 +--- a/lib/Test/Modern.pm ++++ b/lib/Test/Modern.pm +@@ -236,7 +236,7 @@ sub _setup_inc + return unless exists($opts->{into_file}); + + # Workaround for File::Spec on legacy Redhat?? +- local $SIG{__WARN__} = 'IGNORE'; ++ local $SIG{__WARN__} = sub {}; + + my $dir = do { + my @tmp = 'File::Spec'->splitpath($opts->{into_file}); +-- +1.9.1 + diff --git a/perl-Test-Modern.spec b/perl-Test-Modern.spec index 2c62aac..e42e2b5 100644 --- a/perl-Test-Modern.spec +++ b/perl-Test-Modern.spec @@ -1,10 +1,11 @@ Name: perl-Test-Modern -Version: 0.005 +Version: 0.006 Release: 1%{?dist} Summary: Precision testing for modern perl License: (GPL+ or Artistic) and CC-BY-SA URL: http://search.cpan.org/dist/Test-Modern/ Source0: http://search.cpan.org/CPAN/authors/id/T/TO/TOBYINK/Test-Modern-%{version}.tar.gz +Patch0: Test-Modern-0.006-warnings.patch BuildArch: noarch # Module Build BuildRequires: perl @@ -12,7 +13,9 @@ BuildRequires: perl(CPAN::Meta::Requirements) >= 2.000 BuildRequires: perl(ExtUtils::MakeMaker) >= 6.17 # Module Runtime BuildRequires: perl(B) +BuildRequires: perl(Cwd) BuildRequires: perl(Exporter::Tiny) >= 0.030 +BuildRequires: perl(File::Spec) BuildRequires: perl(IO::File) >= 1.08 BuildRequires: perl(IO::Handle) >= 1.21 BuildRequires: perl(Import::Into) >= 1.002000 @@ -61,6 +64,9 @@ and loads IO::File (much of the same stuff Modern::Perl does). %prep %setup -q -n Test-Modern-%{version} +# Upstream workaround for warnings in File::Spec +%patch0 -p1 + %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} @@ -79,9 +85,18 @@ make test # GPL+ or Artistic %doc Changes COPYRIGHT CREDITS LICENSE README %{perl_vendorlib}/Test/ -%{_mandir}/man3/Test::Modern.3pm* +%{_mandir}/man3/Test::Modern.3* %changelog +* Fri Apr 4 2014 Paul Howarth - 0.006-1 +- Update to 0.006 + - EXPERIMENTALLY provide Test::Lib-like behavior, and a related -lib export + tag + - Support an environment variable PERL_TEST_MODERN_ALLOW_WARNINGS to allow + end-users to skip running end warnings tests + - Added shouldnt_warn function +- Add upstream workaround for warnings generated in File::Spec + * Wed Mar 26 2014 Paul Howarth - 0.005-1 - Update to 0.005 - Support Perl 5.6.1+ diff --git a/sources b/sources index 258bbd7..7ad3a70 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f8fd4268c7eb79b02caf6cd3b94ed00f Test-Modern-0.005.tar.gz +23e9158b6b7600d86152231e6e6f1207 Test-Modern-0.006.tar.gz