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