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