1 | %{bcond_with perl_Try_Tiny_enables_optional_test}
|
---|
2 |
|
---|
3 | Name: perl-Try-Tiny
|
---|
4 | Summary: Minimal try/catch with proper localization of $@
|
---|
5 | Version: 0.30
|
---|
6 | Release: 1%{?dist}
|
---|
7 | License: MIT
|
---|
8 | URL: http://search.cpan.org/dist/Try-Tiny
|
---|
9 | Vendor: bww bitwise works GmbH
|
---|
10 | Source0: http://search.cpan.org/CPAN/authors/id/E/ET/ETHER/Try-Tiny-%{version}.tar.gz
|
---|
11 | BuildArch: noarch
|
---|
12 | # Module Build
|
---|
13 | BuildRequires: coreutils
|
---|
14 | BuildRequires: findutils
|
---|
15 | BuildRequires: make
|
---|
16 | BuildRequires: perl-generators
|
---|
17 | #BuildRequires: perl-interpreter
|
---|
18 | BuildRequires: perl(ExtUtils::MakeMaker)
|
---|
19 | # Module
|
---|
20 | BuildRequires: perl(Carp)
|
---|
21 | BuildRequires: perl(constant)
|
---|
22 | BuildRequires: perl(Exporter) >= 5.57
|
---|
23 | BuildRequires: perl(strict)
|
---|
24 | BuildRequires: perl(Sub::Util)
|
---|
25 | BuildRequires: perl(warnings)
|
---|
26 | # Test Suite
|
---|
27 | BuildRequires: perl(File::Spec)
|
---|
28 | BuildRequires: perl(Test::More) >= 0.96
|
---|
29 | # Optional Tests
|
---|
30 | %if %{with perl_Try_Tiny_enables_optional_test}
|
---|
31 | BuildRequires: perl(Capture::Tiny) >= 0.12
|
---|
32 | BuildRequires: perl(CPAN::Meta) >= 2.120900
|
---|
33 | BuildRequires: perl(CPAN::Meta::Check) >= 0.011
|
---|
34 | BuildRequires: perl(CPAN::Meta::Requirements)
|
---|
35 | %endif
|
---|
36 | # Runtime
|
---|
37 | Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
---|
38 | Requires: perl(Sub::Util)
|
---|
39 |
|
---|
40 | # Do not provide private modules from tests packaged as a documentation
|
---|
41 | %global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_docdir}/
|
---|
42 |
|
---|
43 | %description
|
---|
44 | This module provides bare bones try/catch statements that are designed to
|
---|
45 | minimize common mistakes with eval blocks, and NOTHING else.
|
---|
46 |
|
---|
47 | This is unlike TryCatch, which provides a nice syntax and avoids adding
|
---|
48 | another call stack layer, and supports calling return from the try block to
|
---|
49 | return from the parent subroutine. These extra features come at a cost of a
|
---|
50 | few dependencies, namely Devel::Declare and Scope::Upper that are occasionally
|
---|
51 | problematic, and the additional catch filtering uses Moose type constraints,
|
---|
52 | which may not be desirable either.
|
---|
53 |
|
---|
54 | %prep
|
---|
55 | %setup -q -n Try-Tiny-%{version}
|
---|
56 |
|
---|
57 | %build
|
---|
58 | perl Makefile.PL INSTALLDIRS=vendor
|
---|
59 | make %{?_smp_mflags}
|
---|
60 | make manifypods
|
---|
61 |
|
---|
62 | %install
|
---|
63 | make pure_install DESTDIR=%{buildroot}
|
---|
64 | find %{buildroot} -type f -name .packlist -delete
|
---|
65 | %{_fixperms} -c %{buildroot}
|
---|
66 |
|
---|
67 | %check
|
---|
68 | #make test
|
---|
69 |
|
---|
70 | %files
|
---|
71 | %license LICENCE
|
---|
72 | %doc Changes CONTRIBUTING README t/
|
---|
73 | %{perl_vendorlib}/Try/
|
---|
74 | %{_mandir}/man3/Try.Tiny.3*
|
---|
75 |
|
---|
76 | %changelog
|
---|
77 | * Fri Feb 23 2018 Silvan Scherrer <silvan.scherrer@aroa.ch> - 0.30-1
|
---|
78 | - initial version
|
---|