diff --git a/Try-Tiny-0.17-old-Test::More.patch b/Try-Tiny-0.17-old-Test::More.patch new file mode 100644 index 0000000..c8a4796 --- /dev/null +++ b/Try-Tiny-0.17-old-Test::More.patch @@ -0,0 +1,16 @@ +--- t/global_destruction_forked.t ++++ t/global_destruction_forked.t +@@ -1,6 +1,6 @@ + use strict; + use warnings; +-use Test::More; ++use Test::More tests => 3; + use Try::Tiny; + + { +@@ -54,4 +54,4 @@ + } + finally { exit 1 if $parent != $$ }; + +-done_testing; ++pass("Didn't just exit"); diff --git a/perl-Try-Tiny.spec b/perl-Try-Tiny.spec index 4df8589..d5a1d07 100644 --- a/perl-Try-Tiny.spec +++ b/perl-Try-Tiny.spec @@ -1,11 +1,15 @@ +# We need to patch the test suite if we have Test::More < 0.88 +%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0) + Name: perl-Try-Tiny Summary: Minimal try/catch with proper localization of $@ -Version: 0.16 -Release: 3%{?dist} +Version: 0.17 +Release: 1%{?dist} License: MIT Group: Development/Libraries URL: http://search.cpan.org/dist/Try-Tiny Source0: http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Try-Tiny-%{version}.tar.gz +Patch1: Try-Tiny-0.17-old-Test::More.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildArch: noarch # Module Build @@ -44,6 +48,11 @@ which may not be desirable either. %prep %setup -q -n Try-Tiny-%{version} +# We need to patch the test suite if we have Test::More < 0.88 +%if %{old_test_more} +%patch1 +%endif + %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} @@ -67,6 +76,13 @@ rm -rf %{buildroot} %{_mandir}/man3/Try::Tiny.3pm* %changelog +* Sat Aug 17 2013 Paul Howarth - 0.17-1 +- Update to 0.17 + - Work around Perl RT#119311, which was causing incorrect error messages in + some cases during global destruction + (https://github.com/doy/try-tiny/pull/9) + - Add patch to support building with Test::More < 0.88 + * Sun Aug 04 2013 Fedora Release Engineering - 0.16-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild diff --git a/sources b/sources index 3a0d9c8..226ccdc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -027ebee61b191a4b2fe4107cb7b51c7c Try-Tiny-0.16.tar.gz +e9dc4bf8b02a1c7b5718d05c2f409b26 Try-Tiny-0.17.tar.gz