]> git.pld-linux.org Git - packages/perl-Module-Pluggable-Ordered.git/blame - perl-Module-Pluggable-Ordered.spec
- new
[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
8Summary: Module::Pluggable::Ordered - Call module plugins in a specified order
9#Summary(pl):
10Name: perl-Module-Pluggable-Ordered
11Version: 1.4
12Release: 1
13# same as perl
14License: GPL v1+ or Artistic
15Group: Development/Languages/Perl
16Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
17# Source0-md5: a63e0c325b9690680d7ee6ac34e178d0
18BuildRequires: perl-devel >= 1:5.8.0
19BuildRequires: rpm-perlprov >= 4.1-13
20%if %{with tests}
21BuildRequires: perl-Module-Pluggable >= 1.9
22BuildRequires: perl-UNIVERSAL-exports
23%endif
24BuildArch: noarch
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
28This module behaves exactly the same as C<Module::Pluggable>, supporting
29all of its options, but also mixes in the C<call_plugins> method to your
30class. C<call_plugins> acts a little like C<Class::Trigger>; it takes the
31name of a method, and some parameters. Let's say we call it like so:
32
33 __PACKAGE__->call_plugins("my_method", @something);
34
35C<call_plugins> looks at the plugin modules found using C<Module::Pluggable>
36for ones which provide C<my_method_order>. It sorts the modules
37numerically based on the result of this method, and then calls
38C<$_-E<gt>my_method(@something)> on them in order. This produces an
39effect a little like the System V init process, where files can specify
40where in the init sequence they want to be called.
41
42# %description -l pl
43# TODO
44
45%prep
46%setup -q -n %{pdir}-%{pnam}-%{version}
47
48%build
49%{__perl} Makefile.PL \
50 INSTALLDIRS=vendor
51%{__make}
52
53%{?with_tests:%{__make} test}
54
55%install
56rm -rf $RPM_BUILD_ROOT
57
58%{__make} install \
59 DESTDIR=$RPM_BUILD_ROOT
60
61%clean
62rm -rf $RPM_BUILD_ROOT
63
64%files
65%defattr(644,root,root,755)
66%doc Changes
67%{perl_vendorlib}/Module/Pluggable/*.pm
68%{_mandir}/man3/*
This page took 0.055683 seconds and 4 git commands to generate.