summaryrefslogtreecommitdiff
path: root/perl-POE-Exceptions.spec
blob: 995a3f6975dadfc6a35a5f6a10b038468537f185 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#
# Conditional build:
# _without_tests - do not perform "make test"
#
%include	/usr/lib/rpm/macros.perl
%define	pdir	POE
%define	pnam	Exceptions
Summary:	POE::Exceptions - POE class for handling exceptions
Summary(pl):	POE::Exceptions - klasa POE do obsługi wyjątków
Name:		perl-POE-Exceptions
Version:	0.02
Release:	1
License:	BSD-like
Group:		Development/Languages/Perl
Source0:	http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
# Source0-md5:	599004002a158c9fdd095258c0a9afd8
BuildRequires:	perl-devel >= 5.6
BuildRequires:	rpm-perlprov >= 4.1-13
%if %{!?_without_tests:1}0
BuildRequires:	perl-POE >= 0.22
%endif
BuildArch:	noarch
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
POE::Exceptions extends POE to catch exceptions neatly. A new signal,
"DIE", is introduced. This signal will be fired every time an
exception occurs. (For those of you new to the term exception, an
exception is whenever the code decides to bail out by "die"'ing.) If
the signal handler returns 1, POE will assume that the handler dealt
with the signal appropriately. If the signal handler returns 0, POE
will assume that the handler does not want to deal with the signal and
POE will propagate the exception as if the handler never existed.

%description -l pl
POE::Exceptions rozszerza POE o miły sposób przechwytywania wyjątków.
Wprowadza nowy sygnał "DIE". Ten sygnał zostanie wysłany przy każdym
wystąpieniu wyjątku (na wypadek, gdyby termin "wyjątek" wydawał się
obcy - wyjątek występuje wtedy, kiedy kod decyduje się na awaryjne
zakończenie poprzez "die"). Jeśli procedura obsługi sygnału zwróci 1,
POE założy, że procedura poradziła sobie właściwie z tym sygnałem.
Jeśli jednak zwróci 0, POE założy, że procedura nie chce zajmować się
tym sygnałem, więc przekaże wyjątek tak, jakby procedury obsługi nie
było.

%prep
%setup -q -n %{pdir}-%{pnam}-%{version}

%build
%{__perl} Makefile.PL \
	INSTALLDIRS=vendor
%{__make}

%{!?_without_tests:%{__make} test}

%install
rm -rf $RPM_BUILD_ROOT

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc CHANGES
%{perl_vendorlib}/%{pdir}/*.pm
%{perl_vendorlib}/%{pdir}/*/*.pm
%{_mandir}/man3/*