]>
Commit | Line | Data |
---|---|---|
5d108623 | 1 | # |
2 | # Conditional build: | |
0bdc45d8 | 3 | %bcond_with tests # perform "make test" |
b1c242bc ER |
4 | |
5 | %define pdir MOP | |
6 | %define pnam MOP | |
c3b5a52c | 7 | %include /usr/lib/rpm/macros.perl |
c1f106f4 | 8 | Summary: MOP::MOP - Perl extension providing a meta-object protocol for Perl modules |
c3d3a461 | 9 | Summary(pl.UTF-8): MOP::MOP - rozszerzenie Perla udostępniające modułom meta-obiektowy protokół |
cb00e9c7 | 10 | Name: perl-MOP |
11 | Version: 1.00 | |
619798ea | 12 | Release: 11 |
a94d94c0 | 13 | # same as perl |
14 | License: GPL v1+ or Artistic | |
cb00e9c7 | 15 | Group: Development/Languages/Perl |
9073bd43 | 16 | Source0: http://www.cpan.org/modules/by-module/MOP/MOP-%{version}.tar.gz |
cc1f2e4f | 17 | # Source0-md5: 93c05ede1ecc9c01a385e4f21fd58382 |
b1c242bc | 18 | URL: http://search.cpan.org/dist/MOP-MOP/ |
b3381357 | 19 | BuildRequires: perl-devel >= 1:5.8.0 |
b1c242bc | 20 | BuildRequires: rpm-perlprov >= 4.1-13 |
0bdc45d8 | 21 | %if %{with tests} |
c3b5a52c | 22 | BuildRequires: perl-Filter |
93e39fe2 | 23 | BuildRequires: rsh |
24 | BuildRequires: rshd | |
5d108623 | 25 | %endif |
49a4d914 | 26 | BuildArch: noarch |
59cfa6ae | 27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
cb00e9c7 | 28 | |
29 | %description | |
4e70012c | 30 | This module provides a simple and, in my opinion, powerful meta-object |
b1c242bc | 31 | protocol (MOP) for Perl5 modules. In short, such MOP allows to trap |
c1f106f4 | 32 | the method calls made on an object (represented by a reference) before |
4e70012c | 33 | they reach the original module implementing them. These method calls |
34 | are redirected to another module, called the meta-module, before their | |
35 | execution. The original (legitimate) destination of the method call is | |
36 | in the (base) module. Of course, one day or another, the meta-module | |
c1f106f4 JB |
37 | should perform the actual normal method call at the base level, but it |
38 | can do some nice things before or after doing that. And this is the | |
4e70012c | 39 | whole purpose of its existence. |
cb00e9c7 | 40 | |
7f2eaf69 JR |
41 | %description -l pl.UTF-8 |
42 | Ten moduł udostępnia modułom Perla prosty, i, zdaniem autora, o dużych | |
43 | możliwościach protokół meta-obiektowy (meta-object protocol - MOP). W | |
44 | skrócie, MOP pozwala na przechwytywanie wywołań metod na obiekcie | |
45 | (reprezentowanym przez referencję) przed osiągnięciem oryginalnego | |
46 | modułu zawierającego implementację. Te wywołania metod są przed | |
47 | wykonaniem przekierowywane do innego modułu, zwanego meta-modułem. | |
48 | Oryginalny cel wywołania metody jest w module bazowym. Oczywiście w | |
49 | którymś momencie meta-moduł powinien wykonać normalne wywołanie metody | |
50 | na poziomie podstawowym, ale przed lub po tym może robić różne rzeczy. | |
51 | I to właśnie jest celem istnienia modułu MOP. | |
c1f106f4 | 52 | |
cb00e9c7 | 53 | %prep |
54 | %setup -q -n MOP-%{version} | |
55 | ||
56 | %build | |
4289efed | 57 | %{__perl} Makefile.PL \ |
c7444d9e | 58 | INSTALLDIRS=vendor |
a0661e28 | 59 | %{__make} |
9cb3b00d | 60 | |
0bdc45d8 | 61 | %{?with_tests:%{__make} test} |
cb00e9c7 | 62 | |
63 | %install | |
64 | rm -rf $RPM_BUILD_ROOT | |
cb00e9c7 | 65 | |
df3bf2d8 | 66 | %{__make} install \ |
67 | DESTDIR=$RPM_BUILD_ROOT | |
cb00e9c7 | 68 | |
cb00e9c7 | 69 | %clean |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %files | |
73 | %defattr(644,root,root,755) | |
5d108623 | 74 | %doc Changes README |
4289efed | 75 | %{perl_vendorlib}/MOP |
cb00e9c7 | 76 | %{_mandir}/man3/* |