]>
Commit | Line | Data |
---|---|---|
1cc55b6c | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without autodeps # don't BR packages needed only for resolving deps | |
4 | %bcond_without tests # do not perform "make test" | |
5 | # | |
1cc55b6c | 6 | %define pdir Params |
7 | %define pnam Coerce | |
10f87099 JB |
8 | Summary: Params::Coerce - allows your classes to do coercion of parameters |
9 | Summary(pl.UTF-8): Params::Coerce - umożliwienie klasom jawnej kowersji typów parametrów | |
1cc55b6c | 10 | Name: perl-Params-Coerce |
11 | Version: 0.14 | |
12 | Release: 1 | |
13 | License: GPL v1+ or Artistic | |
14 | Group: Development/Languages/Perl | |
15 | Source0: http://www.cpan.org/modules/by-module/Params/%{pdir}-%{pnam}-%{version}.tar.gz | |
16 | # Source0-md5: a8439ea6777c9156424ef6dd74c83945 | |
17 | URL: http://search.cpan.org/dist/Params-Coerce/ | |
18 | BuildRequires: perl-devel >= 1:5.8.0 | |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
20 | %if %{with autodeps} || %{with tests} | |
21 | BuildRequires: perl-Params-Util >= 0.05 | |
22 | %endif | |
23 | BuildArch: noarch | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | A big part of good API design is that we should be able to be flexible | |
28 | in the ways that we take parameters. | |
29 | ||
30 | Params::Coerce attempts to encourage this, by making it easier to take | |
10f87099 | 31 | a variety of different arguments, while adding negligible additional |
1cc55b6c | 32 | complexity to your code. |
33 | ||
10f87099 | 34 | "Coercion" in computing terms generally refers to "implicit type |
1cc55b6c | 35 | conversion". This is where data and object are converted from one type |
36 | to another behind the scenes, and you just just magically get what you | |
37 | need. | |
38 | ||
1cc55b6c | 39 | %description -l pl.UTF-8 |
40 | Dużą częścią dobrego projektu API jest możliwość elastycznego | |
10f87099 JB |
41 | przekazywania parametrów. |
42 | ||
43 | Params::Coerce próbuje zachęcić do tego poprzez ułatwianie | |
44 | przyjmowania różnych argumentów przy zaniedbywalnie małej komplikacji | |
45 | kodu. | |
1cc55b6c | 46 | |
10f87099 JB |
47 | "Coercion" oznacza "domyślną konwersję typów". Dotyczy to sytuacji, |
48 | kiedy dane i obiekty są w tle konwertowane z jednego typu do innego i | |
49 | magicznie otrzymuje się to, co potrzeba. | |
1cc55b6c | 50 | |
51 | %prep | |
52 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
53 | ||
54 | %build | |
55 | %{__perl} Makefile.PL \ | |
56 | INSTALLDIRS=vendor | |
57 | %{__make} | |
58 | ||
59 | %{?with_tests:%{__make} test} | |
60 | ||
61 | %install | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %{__make} install \ | |
65 | DESTDIR=$RPM_BUILD_ROOT | |
66 | ||
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %files | |
71 | %defattr(644,root,root,755) | |
72 | %doc Changes README | |
10f87099 JB |
73 | %{perl_vendorlib}/Params/Coerce.pm |
74 | %{_mandir}/man3/Params::Coerce.3pm* |