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