]>
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 |
46ac0e9a | 11 | Version: 1.17 |
bc6b8d20 | 12 | Release: 2 |
5c983ee9 | 13 | License: Artistic v2 |
dbcec85a | 14 | Group: Development/Languages/Perl |
5c983ee9 | 15 | Source0: http://www.cpan.org/modules/by-module/Params/%{pdir}-%{pnam}-%{version}.tar.gz |
46ac0e9a | 16 | # Source0-md5: 783cd47ab1e73ca5ec08a7340d97fb54 |
9ef563d2 | 17 | URL: http://search.cpan.org/dist/Params-Validate/ |
423eb6b5 JB |
18 | BuildRequires: perl(Pod::Man) >= 1.14 |
19 | BuildRequires: perl-ExtUtils-CBuilder | |
eba5aef4 | 20 | BuildRequires: perl-Module-Build >= 0.3601 |
1c1e3fe4 | 21 | %if %{with tests} |
423eb6b5 | 22 | BuildRequires: perl-Attribute-Handlers >= 0.79 |
5c983ee9 | 23 | BuildRequires: perl-Module-Implementation >= 0.04 |
8d726053 | 24 | BuildRequires: perl-Scalar-List-Utils >= 1.10 |
eba5aef4 | 25 | BuildRequires: perl-Test-Simple >= 0.88 |
b37f9241 | 26 | BuildRequires: perl-Test-Taint |
1c1e3fe4 | 27 | %endif |
eba5aef4 | 28 | BuildRequires: perl-devel >= 1:5.8.1 |
5b7bcdca | 29 | BuildRequires: rpm-perlprov >= 4.1-13 |
dbcec85a JR |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
048bb18a | 33 | The Params::Validate module allows you to validate method or function |
34 | call parameters to an arbitrary level of specificity. At the simplest | |
35 | level, it is capable of validating the required parameters were given | |
36 | and that no unspecified additional parameters were passed in. | |
37 | ||
f6017dc7 JB |
38 | It is also capable of determining that a parameter is of a specific |
39 | type, that it is an object of a certain class hierarchy, that it | |
40 | possesses certain methods, or applying validation callbacks to | |
41 | arguments. | |
d2255876 | 42 | |
4ed71d70 JR |
43 | %description -l pl.UTF-8 |
44 | Moduł Params::Validate pozwala na sprawdzanie poprawności parametrów, | |
45 | z jakimi wywołana została funkcja lub metoda, na dowolnym poziomie | |
46 | szczegółowości. W najprostszym przypadku możliwe jest sprawdzenie, | |
47 | czy podane zostały parametry wymagane i czy nie podano dodatkowych, | |
048bb18a | 48 | nie rozpoznawanych. |
49 | ||
4ed71d70 JR |
50 | Potrafi także określić czy parametr jest konkretnego typu, czy jest |
51 | obiektem danej hierarchii, czy posiada zadane metody, lub przypisać | |
52 | argumentom callbacki (a, i tak wszyscy wiedzą, o co chodzi... ;-> ) | |
53 | sprawdzające. | |
dbcec85a JR |
54 | |
55 | %prep | |
048bb18a | 56 | %setup -q -n %{pdir}-%{pnam}-%{version} |
dbcec85a JR |
57 | |
58 | %build | |
0f297cf9 | 59 | %{__perl} Build.PL \ |
423eb6b5 JB |
60 | installdirs=vendor \ |
61 | --config cc="%{__cc}" \ | |
62 | --config ld="%{__cc}" \ | |
63 | --config optimize="%{rpmcflags}" | |
0f297cf9 | 64 | |
423eb6b5 | 65 | %{__perl} ./Build |
dbcec85a | 66 | |
423eb6b5 | 67 | %{?with_tests:%{__perl} ./Build test} |
048bb18a | 68 | |
dbcec85a JR |
69 | %install |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
423eb6b5 JB |
72 | %{__perl} ./Build install \ |
73 | destdir=$RPM_BUILD_ROOT | |
dbcec85a | 74 | |
46ac0e9a JB |
75 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Params/Validate/XS/XS.bs |
76 | ||
dbcec85a JR |
77 | %clean |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %files | |
81 | %defattr(644,root,root,755) | |
46ac0e9a | 82 | %doc Changes TODO |
aa140d82 | 83 | %dir %{perl_vendorarch}/Attribute |
9ef563d2 | 84 | %dir %{perl_vendorarch}/Attribute/Params |
423eb6b5 | 85 | %{perl_vendorarch}/Attribute/Params/Validate.pm |
9ef563d2 | 86 | %dir %{perl_vendorarch}/Params |
5c983ee9 JB |
87 | %{perl_vendorarch}/Params/Validate.pm |
88 | %{perl_vendorarch}/Params/ValidatePP.pm | |
89 | %{perl_vendorarch}/Params/ValidateXS.pm | |
90 | %{perl_vendorarch}/Params/Validate | |
423eb6b5 JB |
91 | %dir %{perl_vendorarch}/auto/Params |
92 | %dir %{perl_vendorarch}/auto/Params/Validate | |
5c983ee9 | 93 | %dir %{perl_vendorarch}/auto/Params/Validate/XS |
5c983ee9 | 94 | %attr(755,root,root) %{perl_vendorarch}/auto/Params/Validate/XS/XS.so |
423eb6b5 JB |
95 | %{_mandir}/man3/Attribute::Params::Validate.3pm* |
96 | %{_mandir}/man3/Params::Validate*.3pm* |