]> git.pld-linux.org Git - packages/perl-Try-Tiny.git/blob - perl-Try-Tiny.spec
- up to 0.11
[packages/perl-Try-Tiny.git] / perl-Try-Tiny.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %include        /usr/lib/rpm/macros.perl
6 %define pdir    Try
7 %define pnam    Tiny
8 Summary:        Try::Tiny - minimal try/catch with proper localization of $@
9 Summary(pl.UTF-8):      Try::Tiny - minimaly try/catch z odpowiednią lokalizacją $@
10 Name:           perl-Try-Tiny
11 Version:        0.11
12 Release:        1
13 # same as perl
14 License:        GPL v1+ or Artistic
15 Group:          Development/Languages/Perl
16 Source0:        http://www.cpan.org/modules/by-authors/id/D/DO/DOY/Try-Tiny-%{version}.tar.gz
17 # Source0-md5:  4d2c8ff385ac3513edf4c042dd0eacbe
18 URL:            http://search.cpan.org/dist/Try-Tiny/
19 BuildRequires:  perl-devel >= 1:5.8.0
20 BuildRequires:  rpm-perlprov >= 4.1-13
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
78 %dir %{perl_vendorlib}/Try
79 %{perl_vendorlib}/Try/Tiny.pm
80 %{_mandir}/man3/Try::Tiny.3pm*
This page took 0.117641 seconds and 3 git commands to generate.