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