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
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 C<Module::Pluggable>, supporting
29 all of its options, but also mixes in the C<call_plugins> method to your
30 class. C<call_plugins> acts a little like C<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 C<call_plugins> looks at the plugin modules found using C<Module::Pluggable>
36 for ones which provide C<my_method_order>. It sorts the modules
37 numerically based on the result of this method, and then calls
38 C<$_-E<gt>my_method(@something)> on them in order. This produces an
39 effect a little like the System V init process, where files can specify
40 where in the init sequence they want to be called.
46 %setup -q -n %{pdir}-%{pnam}-%{version}
49 %{__perl} Makefile.PL \
53 %{?with_tests:%{__make} test}
56 rm -rf $RPM_BUILD_ROOT
59 DESTDIR=$RPM_BUILD_ROOT
62 rm -rf $RPM_BUILD_ROOT
65 %defattr(644,root,root,755)
67 %{perl_vendorlib}/Module/Pluggable/*.pm