39b0f4
%if ! (0%{?rhel})
39b0f4
%{bcond_without perl_Try_Tiny_enables_optional_test}
39b0f4
%else
39b0f4
%{bcond_with perl_Try_Tiny_enables_optional_test}
39b0f4
%endif
39b0f4
39b0f4
Name:		perl-Try-Tiny
39b0f4
Summary:	Minimal try/catch with proper localization of $@
39b0f4
Version:	0.30
39b0f4
Release:	2%{?dist}
39b0f4
License:	MIT
39b0f4
URL:		http://search.cpan.org/dist/Try-Tiny
39b0f4
Source0:	http://search.cpan.org/CPAN/authors/id/E/ET/ETHER/Try-Tiny-%{version}.tar.gz
39b0f4
BuildArch:	noarch
39b0f4
# Module Build
39b0f4
BuildRequires:	coreutils
39b0f4
BuildRequires:	findutils
39b0f4
BuildRequires:	make
39b0f4
BuildRequires:	perl-generators
39b0f4
BuildRequires:	perl-interpreter
39b0f4
BuildRequires:	perl(ExtUtils::MakeMaker)
39b0f4
# Module
39b0f4
BuildRequires:	perl(Carp)
39b0f4
BuildRequires:	perl(constant)
39b0f4
BuildRequires:	perl(Exporter) >= 5.57
39b0f4
BuildRequires:	perl(strict)
39b0f4
BuildRequires:	perl(Sub::Util)
39b0f4
BuildRequires:	perl(warnings)
39b0f4
# Test Suite
39b0f4
BuildRequires:	perl(File::Spec)
39b0f4
BuildRequires:	perl(Test::More) >= 0.96
39b0f4
# Optional Tests
39b0f4
%if %{with perl_Try_Tiny_enables_optional_test}
39b0f4
BuildRequires:	perl(Capture::Tiny) >= 0.12
39b0f4
BuildRequires:	perl(CPAN::Meta) >= 2.120900
39b0f4
BuildRequires:	perl(CPAN::Meta::Check) >= 0.011
39b0f4
BuildRequires:	perl(CPAN::Meta::Requirements)
39b0f4
%endif
39b0f4
# Runtime
39b0f4
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
39b0f4
Requires:	perl(Sub::Util)
39b0f4
39b0f4
# Do not provide private modules from tests packaged as a documentation
39b0f4
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_docdir}/
39b0f4
39b0f4
%description
39b0f4
This module provides bare bones try/catch statements that are designed to
39b0f4
minimize common mistakes with eval blocks, and NOTHING else.
39b0f4
39b0f4
This is unlike TryCatch, which provides a nice syntax and avoids adding
39b0f4
another call stack layer, and supports calling return from the try block to
39b0f4
return from the parent subroutine. These extra features come at a cost of a
39b0f4
few dependencies, namely Devel::Declare and Scope::Upper that are occasionally
39b0f4
problematic, and the additional catch filtering uses Moose type constraints,
39b0f4
which may not be desirable either.
39b0f4
39b0f4
%prep
39b0f4
%setup -q -n Try-Tiny-%{version}
39b0f4
39b0f4
%build
39b0f4
perl Makefile.PL INSTALLDIRS=vendor
39b0f4
make %{?_smp_mflags}
39b0f4
39b0f4
%install
39b0f4
make pure_install DESTDIR=%{buildroot}
39b0f4
find %{buildroot} -type f -name .packlist -delete
39b0f4
%{_fixperms} -c %{buildroot}
39b0f4
39b0f4
%check
39b0f4
make test
39b0f4
39b0f4
%files
39b0f4
%license LICENCE
39b0f4
%doc Changes CONTRIBUTING README t/
39b0f4
%{perl_vendorlib}/Try/
39b0f4
%{_mandir}/man3/Try::Tiny.3*
39b0f4
39b0f4
%changelog
39b0f4
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.30-2
39b0f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
39b0f4
39b0f4
* Thu Dec 21 2017 Paul Howarth <paul@city-fan.org> - 0.30-1
39b0f4
- Update to 0.30
39b0f4
  - Expand "when" test skippage to more perl versions
39b0f4
39b0f4
* Tue Dec 19 2017 Paul Howarth <paul@city-fan.org> - 0.29-1
39b0f4
- Update to 0.29
39b0f4
  - Skip tests of "when" and "given/when" usage for perl 5.27.7 *only*
39b0f4
    (see CPAN RT#123908)
39b0f4
39b0f4
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-4
39b0f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
39b0f4
39b0f4
* Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.28-3
39b0f4
- Perl 5.26 rebuild
39b0f4
39b0f4
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-2
39b0f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
39b0f4
39b0f4
* Mon Jan  9 2017 Paul Howarth <paul@city-fan.org> - 0.28-1
39b0f4
- Update to 0.28
39b0f4
  - Enabled some tests of finally blocks that were disabled on 5.6, now that
39b0f4
    that functionality works (since 0.13) (GH#4)
39b0f4
39b0f4
* Tue Aug 16 2016 Paul Howarth <paul@city-fan.org> - 0.27-1
39b0f4
- Update to 0.27
39b0f4
  - "finally" blocks are now run for all methods of leaving the try block
39b0f4
     (including via exit, goto) (CPAN RT#112099)
39b0f4
  - Switch from finalizers using an array to a hash, to resolve segfaults when
39b0f4
    creating a pseudofork on MSWin before perl 5.20
39b0f4
    (karenetheridge/Sub-Name/#3)
39b0f4
  - Repository moved to the github p5sagit organization (the primary is on
39b0f4
    shadowcat, mirrored to github)
39b0f4
- BR: perl-generators
39b0f4
- Simplify find command using -delete
39b0f4
39b0f4
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.24-3
39b0f4
- Perl 5.24 rebuild
39b0f4
39b0f4
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.24-2
39b0f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
39b0f4
39b0f4
* Fri Dec 11 2015 Paul Howarth <paul@city-fan.org> - 0.24-1
39b0f4
- Update to 0.24
39b0f4
  - Fix syntax of example code (PR#22)
39b0f4
  - 'perl' removed from prerequisite recommendations, to avoid tripping up CPAN
39b0f4
    clients
39b0f4
  - Sub::Util is used preferentially to Sub::Name in most cases (PR#27)
39b0f4
- This release by ETHER → update source URL
39b0f4
- Modernize spec
39b0f4
- Don't run the extra tests
39b0f4
39b0f4
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22-6
39b0f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
39b0f4
39b0f4
* Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.22-5
39b0f4
- Perl 5.22 rebuild
39b0f4
39b0f4
* Thu Jan 15 2015 Petr Pisar <ppisar@redhat.com> - 0.22-4
39b0f4
- Correct dependencies
39b0f4
39b0f4
* Thu Aug 28 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.22-3
39b0f4
- Perl 5.20 rebuild
39b0f4
39b0f4
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22-2
39b0f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
39b0f4
39b0f4
* Tue Apr 29 2014 Paul Howarth <paul@city-fan.org> - 0.22-1
39b0f4
- Update to 0.22
39b0f4
  - Add optional test deps as recommended prereqs
39b0f4
    (https://github.com/doy/try-tiny/pull/18)
39b0f4
- Update patch for building with Test::More < 0.88
39b0f4
39b0f4
* Tue Apr 15 2014 Paul Howarth <paul@city-fan.org> - 0.21-1
39b0f4
- Update to 0.21
39b0f4
  - Also skip the test if Capture::Tiny is too old
39b0f4
    (https://github.com/doy/try-tiny/issues/17)
39b0f4
39b0f4
* Sat Mar 22 2014 Paul Howarth <paul@city-fan.org> - 0.20-1
39b0f4
- Update to 0.20
39b0f4
  - Documentation updates
39b0f4
- Update patch for building with Test::More < 0.88
39b0f4
39b0f4
* Thu Jan 23 2014 Paul Howarth <paul@city-fan.org> - 0.19-1
39b0f4
- Update to 0.19
39b0f4
  - Fix an obscure issue with loading modules during global destruction
39b0f4
    (https://github.com/doy/try-tiny/pull/11)
39b0f4
  - Documentation updates (https://github.com/doy/try-tiny/pull/12)
39b0f4
- Add patch to support building with Test::More < 0.88 again
39b0f4
39b0f4
* Sat Aug 17 2013 Paul Howarth <paul@city-fan.org> - 0.18-1
39b0f4
- Update to 0.18
39b0f4
  - Fix tests for pre-Test-More-0.88 (https://github.com/doy/try-tiny/pull/10)
39b0f4
- Drop upstreamed patch for building with Test::More < 0.88
39b0f4
39b0f4
* Sat Aug 17 2013 Paul Howarth <paul@city-fan.org> - 0.17-1
39b0f4
- Update to 0.17
39b0f4
  - Work around Perl RT#119311, which was causing incorrect error messages in
39b0f4
    some cases during global destruction
39b0f4
    (https://github.com/doy/try-tiny/pull/9)
39b0f4
- Add patch to support building with Test::More < 0.88
39b0f4
39b0f4
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16-3
39b0f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
39b0f4
39b0f4
* Tue Jul 23 2013 Petr Pisar <ppisar@redhat.com> - 0.16-2
39b0f4
- Perl 5.18 rebuild
39b0f4
39b0f4
* Wed Jul 10 2013 Paul Howarth <paul@city-fan.org> - 0.16-1
39b0f4
- Update to 0.16
39b0f4
  - Remove accidental Sub::Name test dependency
39b0f4
39b0f4
* Tue Jul  9 2013 Paul Howarth <paul@city-fan.org> - 0.15-1
39b0f4
- Update to 0.15
39b0f4
  - Optionally use Sub::Name to name the try/catch/finally blocks, if available
39b0f4
- BR:/R: perl(Sub::Name)
39b0f4
- Drop obsoletes/provides for old -tests subpackage
39b0f4
39b0f4
* Sat Jul  6 2013 Paul Howarth <paul@city-fan.org> - 0.14-1
39b0f4
- Update to 0.14
39b0f4
  - Also throw an exception for catch/finally in scalar context (CPAN RT#81070)
39b0f4
39b0f4
* Fri Jul  5 2013 Paul Howarth <paul@city-fan.org> - 0.13-1
39b0f4
- Update to 0.13
39b0f4
  - Fix tests failing on 5.6.x due to differing DESTROY semantics
39b0f4
  - Excise superfluous local($@) call - 7%% speedup
39b0f4
  - Fix broken URLs (CPAN RT#55659)
39b0f4
  - Proper exception on erroneous usage of bare catch/finally (CPAN RT#81070)
39b0f4
  - Proper exception on erroneous use of multiple catch{} blocks
39b0f4
  - Clarify exception occuring on unterminated try block (CPAN RT#75712)
39b0f4
  - Fix the prototypes shown in docs to match code (CPAN RT#79590)
39b0f4
  - Warn loudly on exceptions in finally() blocks
39b0f4
  - dzilify
39b0f4
- Ship upstream LICENSE and README files
39b0f4
- Classify buildreqs by usage
39b0f4
- Add buildreqs for extra tests and explicitly run them
39b0f4
39b0f4
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12-2
39b0f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
39b0f4
39b0f4
* Wed Jan  2 2013 Paul Howarth <paul@city-fan.org> - 0.12-1
39b0f4
- Update to 0.12
39b0f4
  - Documentation fixes
39b0f4
39b0f4
* Tue Aug 28 2012 Jitka Plesnikova <jplesnik@redhat.com> - 0.11-7
39b0f4
- Add BR/R perl(Exporter)
39b0f4
39b0f4
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-6
39b0f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
39b0f4
39b0f4
* Fri Jun 08 2012 Petr Pisar <ppisar@redhat.com> - 0.11-5
39b0f4
- Perl 5.16 rebuild
39b0f4
39b0f4
* Mon Mar 26 2012 Paul Howarth <paul@city-fan.org> - 0.11-4
39b0f4
- BR: perl(Carp)
39b0f4
- Don't need to remove empty directories from buildroot
39b0f4
- Don't use macros for commands
39b0f4
- Drop redundant %%{?perl_default_filter}
39b0f4
- Enhance %%description
39b0f4
- Reinstate EPEL-5 compatibility:
39b0f4
  - Define buildroot
39b0f4
  - Clean buildroot in %%install and %%clean
39b0f4
- Use tabs
39b0f4
39b0f4
* Sun Jan 22 2012 Iain Arnell <iarnell@gmail.com> - 0.11-3
39b0f4
- Drop tests subpackage; move tests to main package documentation
39b0f4
39b0f4
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-2
39b0f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
39b0f4
39b0f4
* Sun Oct 02 2011 Iain Arnell <iarnell@gmail.com> - 0.11-1
39b0f4
- Update to latest upstream version
39b0f4
39b0f4
* Wed Jun 15 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.09-2
39b0f4
- Perl mass rebuild
39b0f4
39b0f4
* Fri Mar 18 2011 Iain Arnell <iarnell@gmail.com> - 0.09-1
39b0f4
- Update to latest upstream version
39b0f4
- Clean up spec for modern rpmbuild
39b0f4
39b0f4
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.07-2
39b0f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
39b0f4
39b0f4
* Mon Nov  1 2010 Paul Howarth <paul@city-fan.org> - 0.07-1
39b0f4
- Update to 0.07
39b0f4
  - Allow multiple finally blocks
39b0f4
  - Pass the error, if any, to finally blocks when called
39b0f4
  - Documentation fixes and clarifications
39b0f4
- This release by RJBS -> update source URL
39b0f4
39b0f4
* Fri May 07 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.04-2
39b0f4
- Mass rebuild with perl-5.12.0
39b0f4
39b0f4
* Tue Mar 02 2010 Chris Weyl <cweyl@alumni.drew.edu> - 0.04-1
39b0f4
- Update by Fedora::App::MaintainerTools 0.004
39b0f4
- PERL_INSTALL_ROOT => DESTDIR
39b0f4
- Updating to latest GA CPAN version (0.04)
39b0f4
39b0f4
* Fri Dec  4 2009 Stepan Kasal <skasal@redhat.com> - 0.02-2
39b0f4
- Rebuild against perl 5.10.1
39b0f4
39b0f4
* Tue Sep 15 2009 Chris Weyl <cweyl@alumni.drew.edu> - 0.02-1
39b0f4
- Submission
39b0f4
39b0f4
* Tue Sep 15 2009 Chris Weyl <cweyl@alumni.drew.edu> - 0.02-0
39b0f4
- Initial RPM packaging
39b0f4
- Generated with cpan2dist (CPANPLUS::Dist::RPM version 0.0.8)