]> git.pld-linux.org Git - packages/perl-Module-Pluggable-Ordered.git/blame - perl-Module-Pluggable-Ordered.spec
- generic URL
[packages/perl-Module-Pluggable-Ordered.git] / perl-Module-Pluggable-Ordered.spec
CommitLineData
a9b299f9 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
0bf75ff4 8Summary: Module::Pluggable::Ordered - call module plugins in a specified order
1c41d035 9Summary(pl.UTF-8): Module::Pluggable::Ordered - wywoływanie modułów-wtyczek w zadanej kolejności
a9b299f9 10Name: perl-Module-Pluggable-Ordered
7dc4f0c3 11Version: 1.5
12Release: 1
a9b299f9 13# same as perl
14License: GPL v1+ or Artistic
15Group: Development/Languages/Perl
5dd08171 16Source0: http://www.cpan.org/modules/by-module/Module/%{pdir}-%{pnam}-%{version}.tar.gz
7dc4f0c3 17# Source0-md5: a9a33859fa3ff61a845035d44a2f73e8
5dd08171 18URL: http://search.cpan.org/dist/Module-Pluggable-Ordered/
a9b299f9 19BuildRequires: perl-devel >= 1:5.8.0
20BuildRequires: rpm-perlprov >= 4.1-13
21%if %{with tests}
22BuildRequires: perl-Module-Pluggable >= 1.9
e2882196 23BuildRequires: perl-UNIVERSAL-require
a9b299f9 24%endif
3dbb8fee 25Requires: perl-dirs >= 1.0-5
a9b299f9 26BuildArch: noarch
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
0bf75ff4 30This module behaves exactly the same as Module::Pluggable, supporting
31all of its options, but also mixes in the call_plugins method to your
32class. call_plugins acts a little like Class::Trigger; it takes the
a9b299f9 33name of a method, and some parameters. Let's say we call it like so:
34
3dbb8fee 35__PACKAGE__->call_plugins("my_method", @something);
a9b299f9 36
01cf0f46 37call_plugins looks at the plugin modules found using Module::Pluggable
0bf75ff4 38for ones which provide my_method_order. It sorts the modules
a9b299f9 39numerically based on the result of this method, and then calls
0bf75ff4 40$my_method(@something) on them in order. This produces an effect a
01cf0f46
JB
41little like the System V init process, where files can specify where
42in the init sequence they want to be called.
a9b299f9 43
268b83e5
JR
44%description -l pl.UTF-8
45Ten moduł zachowuje się dokładnie tak samo jak Module::Pluggable,
46obsługując wszystkie jego opcje, ale dodatkowo włącza do klasy metodę
47call_plugins. call_plugins zachowuje się jak Class::Trigger; przyjmuje
48nazwę metody i parametry. W przypadku wywołania powiedzmy:
01cf0f46 49
3dbb8fee 50__PACKAGE__->call_plugins("my_method", @something);
01cf0f46 51
268b83e5
JR
52call_plugins przeszukuje moduły wtyczek znalezione przy użyciu
53Module::Pluggable pod kątem tych, które dostarczają my_method_order.
54Sortuje moduły liczbowo w oparciu o wynik tej metody i wywołuje po
55kolei na nich $my_method(@something). Daje to efekt podobny trochę do
56procesu inicjalizacji Systemu V, gdzie pliki mogą określić sekwencję
57startową, w jakiej mają być wywoływane.
a9b299f9 58
59%prep
60%setup -q -n %{pdir}-%{pnam}-%{version}
61
62%build
63%{__perl} Makefile.PL \
64 INSTALLDIRS=vendor
65%{__make}
66
67%{?with_tests:%{__make} test}
68
69%install
70rm -rf $RPM_BUILD_ROOT
71
72%{__make} install \
73 DESTDIR=$RPM_BUILD_ROOT
74
75%clean
76rm -rf $RPM_BUILD_ROOT
77
78%files
79%defattr(644,root,root,755)
80%doc Changes
81%{perl_vendorlib}/Module/Pluggable/*.pm
82%{_mandir}/man3/*
This page took 0.088557 seconds and 4 git commands to generate.