3 %bcond_without autodeps # don't BR packages needed only for resolving deps
4 %bcond_without tests # do not perform "make test"
6 %include /usr/lib/rpm/macros.perl
9 Summary: Params::Check - a generic input parsing/checking mechanism
10 Summary(pl.UTF-8): Params::Check - ogólny mechanizm analizy i sprawdzania wejścia
11 Name: perl-Params-Check
15 License: GPL v1+ or Artistic
16 Group: Development/Languages/Perl
17 Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
18 # Source0-md5: 1756a2b387544fea13b442f3be8a39dc
19 URL: http://search.cpan.org/dist/Params-Check/
20 BuildRequires: perl-devel >= 1:5.8.0
21 BuildRequires: rpm-perlprov >= 4.1-13
22 %if %{with autodeps} || %{with tests}
23 BuildRequires: perl-Locale-Maketext-Simple
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Perl module Params::Check is a generic input parsing/checking
30 mechanism. It allows you to validate input via a template. The only
31 requirement is that the arguments must be named. Params::Check can do
32 the following things for you:
33 - Convert all keys to lowercase
34 - Check if all required arguments have been provided
35 - Set arguments that have not been provided to the default
36 - Weed out arguments that are not supported and warn about them to the
38 - Validate the arguments given by the user based on strings, regexes,
39 lists or even subroutines
40 - Enforce type integrity if required
42 %description -l pl.UTF-8
43 Moduł Perla Params::Check to ogólny mechanizm do analizy i sprawdzania
44 wejścia. Pozwala na sprawdzanie poprawności wejścia poprzez szablon.
45 Jedynym wymaganiem jest to, żeby argumenty były nazwane. Params::Check
46 może zrobić następujące rzeczy:
47 - przekształcić wszystkie klucze na małe litery
48 - sprawdzić, czy wszystkie wymagane argumenty zostały podane
49 - ustawić nie podane argumenty na wartości domyślne
50 - oddzielić argumenty nieobsługiwane i ostrzec o nich użytkownika
51 - sprawdzić poprawność podanych przez użytkownika argumentów w oparciu
52 o łańcuchy znaków, wyrażenia regularne, listy lub nawet procedury
53 - wymusić spójność typów w razie potrzeby.
56 %setup -q -n %{pdir}-%{pnam}-%{version}
59 %{__perl} Makefile.PL \
64 %{?with_tests:%{__make} test}
67 rm -rf $RPM_BUILD_ROOT
69 %{__make} pure_install \
70 DESTDIR=$RPM_BUILD_ROOT
73 rm -rf $RPM_BUILD_ROOT
76 %defattr(644,root,root,755)
78 %dir %{perl_vendorlib}/Params
79 %{perl_vendorlib}/Params/Check.pm