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