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