]> git.pld-linux.org Git - packages/perl-Module-Pluggable-Ordered.git/blob - perl-Module-Pluggable-Ordered.spec
130eebe90d28e30e9ee177deef16d7233d18bfb9
[packages/perl-Module-Pluggable-Ordered.git] / perl-Module-Pluggable-Ordered.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %include        /usr/lib/rpm/macros.perl
6 %define pdir    Module
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
11 Version:        1.4
12 Release:        1
13 # same as perl
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
20 %if %{with tests}
21 BuildRequires:  perl-Module-Pluggable >= 1.9
22 BuildRequires:  perl-UNIVERSAL-exports
23 %endif
24 BuildArch:      noarch
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
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:
32
33     __PACKAGE__->call_plugins("my_method", @something);
34
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.
41
42 %description -l pl
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:
47
48     __PACKAGE__->call_plugins("my_method", @something);
49
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.
56
57 %prep
58 %setup -q -n %{pdir}-%{pnam}-%{version}
59
60 %build
61 %{__perl} Makefile.PL \
62         INSTALLDIRS=vendor
63 %{__make}
64
65 %{?with_tests:%{__make} test}
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69
70 %{__make} install \
71         DESTDIR=$RPM_BUILD_ROOT
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76 %files
77 %defattr(644,root,root,755)
78 %doc Changes
79 %{perl_vendorlib}/Module/Pluggable/*.pm
80 %{_mandir}/man3/*
This page took 0.285181 seconds and 3 git commands to generate.