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