3 %bcond_without tests # do not perform "make test"
5 %include /usr/lib/rpm/macros.perl
7 %define pnam Pluggable-Ordered
8 Summary: Module::Pluggable::Ordered - call module plugins in a specified order
9 Summary(pl): Module::Pluggable::Ordered - wywo³ywanie modu³ów-wtyczek w zadanej kolejno¶ci
10 Name: perl-Module-Pluggable-Ordered
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: a63e0c325b9690680d7ee6ac34e178d0
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: rpm-perlprov >= 4.1-13
21 BuildRequires: perl-Module-Pluggable >= 1.9
22 BuildRequires: perl-UNIVERSAL-exports
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 This module behaves exactly the same as Module::Pluggable, supporting
29 all of its options, but also mixes in the call_plugins method to your
30 class. call_plugins acts a little like Class::Trigger; it takes the
31 name of a method, and some parameters. Let's say we call it like so:
33 __PACKAGE__->call_plugins("my_method", @something);
35 call_plugins looks at the plugin modules found using Module::Pluggable
36 for ones which provide my_method_order. It sorts the modules
37 numerically based on the result of this method, and then calls
38 $my_method(@something) on them in order. This produces an effect a
39 little like the System V init process, where files can specify where
40 in the init sequence they want to be called.
43 Ten modu³ zachowuje siê dok³adnie tak samo jak Module::Pluggable,
44 obs³uguj±c wszystkie jego opcje, ale dodatkowo w³±cza do klasy metodê
45 call_plugins. call_plugins zachowuje siê jak Class::Trigger; przyjmuje
46 nazwê metody i parametry. W przypadku wywo³ania powiedzmy:
48 __PACKAGE__->call_plugins("my_method", @something);
50 call_plugins przeszukuje modu³y wtyczek znalezione przy u¿yciu
51 Module::Pluggable pod k±tem tych, które dostarczaj± my_method_order.
52 Sortuje modu³y liczbowo w oparciu o wynik tej metody i wywo³uje po
53 kolei na nich $my_method(@something). Daje to efekt podobny trochê do
54 procesu inicjalizacji Systemu V, gdzie pliki mog± okre¶liæ sekwencjê
55 startow±, w jakiej maj± byæ wywo³ywane.
58 %setup -q -n %{pdir}-%{pnam}-%{version}
61 %{__perl} Makefile.PL \
65 %{?with_tests:%{__make} test}
68 rm -rf $RPM_BUILD_ROOT
71 DESTDIR=$RPM_BUILD_ROOT
74 rm -rf $RPM_BUILD_ROOT
77 %defattr(644,root,root,755)
79 %{perl_vendorlib}/Module/Pluggable/*.pm