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