]> git.pld-linux.org Git - packages/perl-Params-Validate.git/blob - perl-Params-Validate.spec
- updated URL
[packages/perl-Params-Validate.git] / perl-Params-Validate.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 #
5 %define         pdir    Params
6 %define         pnam    Validate
7 Summary:        Params::Validate - validate method/function parameters
8 Summary(pl.UTF-8):      Params::Validate - sprawdzanie poprawności parametrów funkcji/metody
9 Name:           perl-Params-Validate
10 Version:        1.31
11 Release:        1
12 License:        Artistic v2.0
13 Group:          Development/Languages/Perl
14 Source0:        http://www.cpan.org/modules/by-module/Params/%{pdir}-%{pnam}-%{version}.tar.gz
15 # Source0-md5:  ef5f57387c2c9032b59fb23023cf5b25
16 URL:            https://metacpan.org/release/Params-Validate
17 BuildRequires:  perl(Pod::Man) >= 1.14
18 BuildRequires:  perl-ExtUtils-CBuilder
19 BuildRequires:  perl-Module-Build >= 0.3601
20 %if %{with tests}
21 BuildRequires:  perl-Attribute-Handlers >= 0.79
22 BuildRequires:  perl-Module-Implementation >= 0.04
23 BuildRequires:  perl-Scalar-List-Utils >= 1.10
24 BuildRequires:  perl-Test-Simple >= 0.96
25 BuildRequires:  perl-Test-Taint >= 0.02
26 %endif
27 BuildRequires:  perl-devel >= 1:5.8.1
28 BuildRequires:  rpm-perlprov >= 4.1-13
29 BuildRequires:  rpmbuild(macros) >= 1.745
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
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
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.
42
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,
48 nie rozpoznawanych.
49
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.
54
55 %prep
56 %setup -q -n %{pdir}-%{pnam}-%{version}
57
58 %build
59 %{__perl} Build.PL \
60         installdirs=vendor \
61         --config cc="%{__cc}" \
62         --config ld="%{__cc}" \
63         --config optimize="%{rpmcflags}"
64
65 %{__perl} ./Build
66
67 %{?with_tests:%{__perl} ./Build test}
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71
72 %{__perl} ./Build install \
73         destdir=$RPM_BUILD_ROOT
74
75 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Params/Validate/XS/XS.bs
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %files
81 %defattr(644,root,root,755)
82 %doc Changes TODO
83 %dir %{perl_vendorarch}/Params
84 %{perl_vendorarch}/Params/Validate.pm
85 %{perl_vendorarch}/Params/ValidatePP.pm
86 %{perl_vendorarch}/Params/ValidateXS.pm
87 %{perl_vendorarch}/Params/Validate
88 %dir %{perl_vendorarch}/auto/Params
89 %dir %{perl_vendorarch}/auto/Params/Validate
90 %dir %{perl_vendorarch}/auto/Params/Validate/XS
91 %attr(755,root,root) %{perl_vendorarch}/auto/Params/Validate/XS/XS.so
92 %{_mandir}/man3/Params::Validate*.3pm*
This page took 0.16322 seconds and 3 git commands to generate.