]> git.pld-linux.org Git - packages/perl-Try-Tiny.git/blob - perl-Try-Tiny.spec
- updated to 0.31
[packages/perl-Try-Tiny.git] / perl-Try-Tiny.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define pdir    Try
6 %define pnam    Tiny
7 Summary:        Try::Tiny - minimal try/catch with proper localization of $@
8 Summary(pl.UTF-8):      Try::Tiny - minimaly try/catch z odpowiednią lokalizacją $@
9 Name:           perl-Try-Tiny
10 Version:        0.31
11 Release:        1
12 License:        MIT
13 Group:          Development/Languages/Perl
14 Source0:        http://www.cpan.org/modules/by-authors/id/E/ET/ETHER/Try-Tiny-%{version}.tar.gz
15 # Source0-md5:  993a29ee8a03c9bd9c2f7c53d1082a03
16 URL:            https://metacpan.org/release/Try-Tiny
17 BuildRequires:  perl-ExtUtils-MakeMaker >= 6.30
18 BuildRequires:  perl-devel >= 1:5.8.0
19 BuildRequires:  rpm-perlprov >= 4.1-13
20 BuildRequires:  rpmbuild(macros) >= 1.745
21 BuildArch:      noarch
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 This module provides bare bones try/catch statements that are designed
26 to minimize common mistakes with eval blocks, and NOTHING else.
27
28 This is unlike TryCatch which provides a nice syntax and avoids adding
29 another call stack layer, and supports calling return from the try
30 block to return from the parent subroutine. These extra features come
31 at a cost of a few dependencies, namely Devel::Declare and
32 Scope::Upper which are occasionally problematic, and the additional
33 catch filtering uses Moose type constraints which may not be desirable
34 either.
35
36 The main focus of this module is to provide simple and reliable error
37 handling for those having a hard time installing TryCatch, but who
38 still want to write correct eval blocks without 5 lines of boilerplate
39 each time.
40
41 %description -l pl.UTF-8
42 Ten moduł udostępnia proste instrukcje try/catch zaprojektowane w
43 celu ograniczenia popularnych błędów w blokach eval - i NIC więcej,
44 w przeciwieństwie do TryCatch, który udostępnia ładną składnię oraz
45 zapobiega dodawaniu kolejnej warstwy stosu wywołań i obsługuje powrót
46 z bloku try do procedury wywołującej. Te dodatkowe możliwości są
47 okupione kilkoma zależnościami (Devel::Declare i Scope::Upper), które
48 bywają problematyczne, a dodatkowe filtrowanie catch wykorzystuje
49 ograniczenia typu Moose, które mogą być niepożądane.
50
51 Głównym celem tego modułu jest udostępnienie prostej i wiarygodnej
52 obsługi błędów dla zmęczonych instalowaniem TryCatch, ale nadal
53 chcących pisać proste bloki eval bez każdorazowych 5 nadmiarowych
54 linii.
55
56 %prep
57 %setup -q -n %{pdir}-%{pnam}-%{version}
58
59 %build
60 %{__perl} Makefile.PL \
61         INSTALLDIRS=vendor
62 %{__make}
63
64 %{?with_tests:%{__make} test}
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68
69 %{__make} pure_install \
70         DESTDIR=$RPM_BUILD_ROOT
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %files
76 %defattr(644,root,root,755)
77 %doc Changes LICENCE
78 %dir %{perl_vendorlib}/Try
79 %{perl_vendorlib}/Try/Tiny.pm
80 %{_mandir}/man3/Try::Tiny.3pm*
This page took 0.077921 seconds and 4 git commands to generate.