]>
Commit | Line | Data |
---|---|---|
1c1e3fe4 | 1 | # |
048bb18a | 2 | # Conditional build: |
cc75d535 | 3 | %bcond_without tests # do not perform "make test" |
1c1e3fe4 | 4 | # |
dbcec85a | 5 | %include /usr/lib/rpm/macros.perl |
6a589881 | 6 | %define pdir Params |
7 | %define pnam Validate | |
f6017dc7 | 8 | Summary: Params::Validate - validate method/function parameters |
803f6e9a | 9 | Summary(pl.UTF-8): Params::Validate - sprawdzanie poprawności parametrów funkcji/metody |
dbcec85a | 10 | Name: perl-Params-Validate |
08d6ea20 | 11 | Version: 0.89 |
d0653200 | 12 | Release: 2 |
1c1e3fe4 | 13 | # same as perl |
3ebda061 | 14 | License: GPL v1+ or Artistic |
dbcec85a | 15 | Group: Development/Languages/Perl |
1af521e1 | 16 | Source0: http://www.cpan.org/modules/by-authors/id/D/DR/DROLSKY/%{pdir}-%{pnam}-%{version}.tar.gz |
08d6ea20 | 17 | # Source0-md5: b53ff2b9595623aaa4f98d8b31a5a1c2 |
9ef563d2 | 18 | URL: http://search.cpan.org/dist/Params-Validate/ |
1c1e3fe4 JB |
19 | %if %{with tests} |
20 | BuildRequires: perl-Attribute-Handlers | |
21 | BuildRequires: perl-Test-Simple | |
b37f9241 | 22 | BuildRequires: perl-Test-Taint |
1c1e3fe4 | 23 | %endif |
cfca4987 | 24 | BuildRequires: perl-devel >= 1:5.8.0 |
5b7bcdca | 25 | BuildRequires: rpm-perlprov >= 4.1-13 |
dbcec85a JR |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
28 | %description | |
048bb18a | 29 | The Params::Validate module allows you to validate method or function |
30 | call parameters to an arbitrary level of specificity. At the simplest | |
31 | level, it is capable of validating the required parameters were given | |
32 | and that no unspecified additional parameters were passed in. | |
33 | ||
f6017dc7 JB |
34 | It is also capable of determining that a parameter is of a specific |
35 | type, that it is an object of a certain class hierarchy, that it | |
36 | possesses certain methods, or applying validation callbacks to | |
37 | arguments. | |
d2255876 | 38 | |
4ed71d70 JR |
39 | %description -l pl.UTF-8 |
40 | Moduł Params::Validate pozwala na sprawdzanie poprawności parametrów, | |
41 | z jakimi wywołana została funkcja lub metoda, na dowolnym poziomie | |
42 | szczegółowości. W najprostszym przypadku możliwe jest sprawdzenie, | |
43 | czy podane zostały parametry wymagane i czy nie podano dodatkowych, | |
048bb18a | 44 | nie rozpoznawanych. |
45 | ||
4ed71d70 JR |
46 | Potrafi także określić czy parametr jest konkretnego typu, czy jest |
47 | obiektem danej hierarchii, czy posiada zadane metody, lub przypisać | |
48 | argumentom callbacki (a, i tak wszyscy wiedzą, o co chodzi... ;-> ) | |
49 | sprawdzające. | |
dbcec85a JR |
50 | |
51 | %prep | |
048bb18a | 52 | %setup -q -n %{pdir}-%{pnam}-%{version} |
dbcec85a JR |
53 | |
54 | %build | |
71967ba6 | 55 | %{__perl} Makefile.PL \ |
83cb4de0 | 56 | INSTALLDIRS=vendor |
cc75d535 | 57 | %{__make} \ |
bf730eea | 58 | CC="%{__cc}" \ |
cc75d535 | 59 | OPTIMIZE="%{rpmcflags}" |
dbcec85a | 60 | |
cc75d535 | 61 | %{?with_tests:%{__make} test} |
048bb18a | 62 | |
dbcec85a JR |
63 | %install |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
cc75d535 | 66 | %{__make} install \ |
67 | DESTDIR=$RPM_BUILD_ROOT | |
dbcec85a | 68 | |
dbcec85a JR |
69 | %clean |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %files | |
73 | %defattr(644,root,root,755) | |
ad72dd39 | 74 | %doc Changes README |
9ef563d2 JB |
75 | %dir %{perl_vendorarch}/auto/Params |
76 | %dir %{perl_vendorarch}/auto/Params/Validate | |
77 | %{perl_vendorarch}/auto/Params/Validate/*.bs | |
78 | %attr(755,root,root) %{perl_vendorarch}/auto/Params/Validate/*.so | |
aa140d82 | 79 | %dir %{perl_vendorarch}/Attribute |
9ef563d2 JB |
80 | %dir %{perl_vendorarch}/Attribute/Params |
81 | %{perl_vendorarch}/Attribute/Params/*.pm | |
82 | %dir %{perl_vendorarch}/Params | |
83 | %{perl_vendorarch}/Params/*.pm | |
dbcec85a | 84 | %{_mandir}/man3/* |