]>
Commit | Line | Data |
---|---|---|
e6c8a76b | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %include /usr/lib/rpm/macros.perl | |
6 | %define pdir Class | |
7 | %define pnam Method-Modifiers | |
8 | Summary: Class::Method::Modifiers - provides Moose-like method modifiers | |
e41a0381 | 9 | Summary(pl.UTF-8): Class::Method::Modifiers - modyfikatory metod na kształt Moose |
e6c8a76b | 10 | Name: perl-Class-Method-Modifiers |
05408e3a | 11 | Version: 2.12 |
e6c8a76b | 12 | Release: 1 |
86b85f9b | 13 | # same as perl 5 |
e6c8a76b | 14 | License: GPL v1+ or Artistic |
15 | Group: Development/Languages/Perl | |
16 | Source0: http://www.cpan.org/modules/by-module/Class/%{pdir}-%{pnam}-%{version}.tar.gz | |
05408e3a | 17 | # Source0-md5: f55400c7a8134acf3657f8af89bdd7af |
e6c8a76b | 18 | URL: http://search.cpan.org/dist/Class-Method-Modifiers/ |
19 | BuildRequires: perl-devel >= 1:5.8.0 | |
20 | BuildRequires: rpm-perlprov >= 4.1-13 | |
21 | %if %{with tests} | |
86b85f9b JB |
22 | BuildRequires: perl-Test-Fatal |
23 | BuildRequires: perl-Test-Requires | |
24 | BuildRequires: perl-Test-Simple >= 0.88 | |
e6c8a76b | 25 | %endif |
26 | BuildArch: noarch | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | In its most basic form, a method modifier is just a method that calls | |
31 | $self->SUPER::foo(@_). | |
32 | ||
33 | Class::Method::Modifiers provides three modifiers: before, around, | |
34 | and after. before and after are run just before and after the method | |
35 | they modify, but can not really affect that original method. around | |
36 | is run in place of the original method, with a hook to easily call | |
e41a0381 | 37 | that original method. |
e6c8a76b | 38 | |
709d43f9 | 39 | %description -l pl.UTF-8 |
e41a0381 JB |
40 | W najprostszej postaci, modyfikator metody to metoda wywołująca |
41 | $self->SUPER::foo(@_). | |
42 | ||
43 | Moduł Class::Method::Modifiers dostarcza trzy modyfikatory: before, | |
44 | around oraz after. Modyfikatory before oraz after są wywoływane | |
45 | bezpośrednio przed i bezpośrednio po modyfikowanej metodzie, ale nie | |
46 | mogą wpływać na oryginalną metodę. Modyfikator around jest wywoływany | |
47 | zamiast oryginalnej metody z uchwytem do łatwego wywołania tej | |
48 | oryginalnej metody. | |
e6c8a76b | 49 | |
50 | %prep | |
51 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
52 | ||
53 | %build | |
54 | %{__perl} Makefile.PL \ | |
55 | INSTALLDIRS=vendor | |
56 | %{__make} | |
57 | ||
58 | %{?with_tests:%{__make} test} | |
59 | ||
60 | %install | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %{__make} pure_install \ | |
64 | DESTDIR=$RPM_BUILD_ROOT | |
65 | ||
66 | %clean | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %files | |
70 | %defattr(644,root,root,755) | |
71 | %doc Changes | |
e41a0381 JB |
72 | %{perl_vendorlib}/Class/Method/Modifiers.pm |
73 | %{_mandir}/man3/Class::Method::Modifiers.3pm* |