3 %bcond_without tests # do not perform "make test"
5 %include /usr/lib/rpm/macros.perl
8 Summary: Return::Value - Polymorphic Return Values
9 Summary(pl): Return::Value - Polimorficzne zwracanie warto¶ci
10 Name: perl-Return-Value
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
21 BuildRequires: perl(Test::More) >= 0.47
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 Polymorphic return values are really useful. Often, we just want to know
28 if something worked or not. Other times, we'd like to know what the
29 error text was. Still others, we may want to know what the error code
30 was, and what the error properties were. We don't want to handle objects
31 or data structures for every single return value, but we do want to
32 check error conditions in our code because that's what good programmers
35 When functions are successful they may return true, or perhaps some
36 useful data. In the quest to provide consistent return values, this gets
37 confusing between complex, informational errors and successful return
40 This module provides these features with a simple API that should get
41 you what you're looking for in each contex a return value is used in.
47 %setup -q -n %{pdir}-%{pnam}-%{version}
50 %{__perl} Makefile.PL \
54 %{?with_tests:%{__make} test}
57 rm -rf $RPM_BUILD_ROOT
60 DESTDIR=$RPM_BUILD_ROOT
63 rm -rf $RPM_BUILD_ROOT
66 %defattr(644,root,root,755)
68 %{perl_vendorlib}/Return/Value.pm