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