]> git.pld-linux.org Git - packages/perl-Return-Value.git/blame - perl-Return-Value.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-Return-Value.git] / perl-Return-Value.spec
CommitLineData
00ef39b3
AG
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4#
00ef39b3
AG
5%define pdir Return
6%define pnam Value
7Summary: Return::Value - Polymorphic Return Values
269a4efe 8Summary(pl.UTF-8): Return::Value - Polimorficzne zwracanie wartości
00ef39b3 9Name: perl-Return-Value
9a96a6a7 10Version: 1.666001
00ef39b3
AG
11Release: 1
12# same as perl
13License: GPL v1+ or Artistic
14Group: Development/Languages/Perl
3c5856c3 15Source0: http://www.cpan.org/modules/by-authors/id/R/RJ/RJBS/%{pdir}-%{pnam}-%{version}.tar.gz
9a96a6a7 16# Source0-md5: 03128d525392c88e458aa2cd14eb107a
3c5856c3 17URL: http://search.cpan.org/dist/Return-Value/
00ef39b3
AG
18BuildRequires: perl-devel >= 1:5.8.0
19BuildRequires: rpm-perlprov >= 4.1-13
20%if %{with tests}
21BuildRequires: perl(Test::More) >= 0.47
22%endif
23BuildArch: noarch
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%description
d92cc43c
JB
27Polymorphic return values are really useful. Often, we just want to
28know if something worked or not. Other times, we'd like to know what
29the error text was. Still others, we may want to know what the error
30code was, and what the error properties were. We don't want to handle
31objects or data structures for every single return value, but we do
32want to check error conditions in our code because that's what good
33programmers do.
00ef39b3
AG
34
35When functions are successful they may return true, or perhaps some
d92cc43c
JB
36useful data. In the quest to provide consistent return values, this
37gets confusing between complex, informational errors and successful
38return values.
00ef39b3
AG
39
40This module provides these features with a simple API that should get
d92cc43c 41you what you're looking for in each context a return value is used in.
00ef39b3 42
cd256e25
JR
43%description -l pl.UTF-8
44Polimorficzne wartości zwracane bywają naprawdę przydatne. Często
45chcemy tylko wiedzieć, czy coś zadziałało, czy nie. Innym razem
46chcielibyśmy poznać tekstową postać błędu. W jeszcze innym przypadku
47możemy chcieć poznać kod błędu i jego właściwości. Nie chcemy
48obsługiwać obiektów czy struktur danych dla każdej zwracanej wartości,
49ale chcemy sprawdzić w naszym kodzie wystąpienie błędu, ponieważ tak
50robią dobrzy programiści.
d92cc43c 51
cd256e25
JR
52W przypadku sukcesu funkcje mogą zwrócić wartość true albo jakieś
53przydatne dane. Przy poszukiwaniu sposobu dostarczenia spójnych
54wartości błędów, staje się to coraz bardziej zagmatwane pomiędzy
55złożonymi, informacyjnymi błędami a poprawnymi zwracanymi wartościami.
d92cc43c 56
cd256e25
JR
57Ten moduł dostarcza te możliwości z prostym API, które powinno
58zapewnić to, czego szukamy w każdym kontekście wykorzystania zwracanej
59wartości.
00ef39b3
AG
60
61%prep
62%setup -q -n %{pdir}-%{pnam}-%{version}
63
64%build
65%{__perl} Makefile.PL \
66 INSTALLDIRS=vendor
67%{__make}
68
69%{?with_tests:%{__make} test}
70
71%install
72rm -rf $RPM_BUILD_ROOT
73
74%{__make} install \
75 DESTDIR=$RPM_BUILD_ROOT
76
77%clean
78rm -rf $RPM_BUILD_ROOT
79
80%files
81%defattr(644,root,root,755)
82%doc Changes README
e4762c9f 83%dir %{perl_vendorlib}/Return
00ef39b3
AG
84%{perl_vendorlib}/Return/Value.pm
85%{_mandir}/man3/*
This page took 0.09793 seconds and 4 git commands to generate.