From 6b3123084011ed1ae83b32d7e3e2e69da62cf2bc Mon Sep 17 00:00:00 2001 From: Chris Weyl Date: Mon, 8 Sep 2008 18:35:32 +0000 Subject: [PATCH] pseudo-branch of perl-Class-Method-Modifiers to F-8 --- import.log | 1 + perl-Class-Method-Modifiers.spec | 73 ++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 75 insertions(+) create mode 100644 import.log create mode 100644 perl-Class-Method-Modifiers.spec diff --git a/import.log b/import.log new file mode 100644 index 0000000..492c969 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +perl-Class-Method-Modifiers-1_01-1_fc9:HEAD:perl-Class-Method-Modifiers-1.01-1.fc9.src.rpm:1220898535 diff --git a/perl-Class-Method-Modifiers.spec b/perl-Class-Method-Modifiers.spec new file mode 100644 index 0000000..2574c1a --- /dev/null +++ b/perl-Class-Method-Modifiers.spec @@ -0,0 +1,73 @@ + +Name: perl-Class-Method-Modifiers +Version: 1.01 +Release: 2%{?dist} +License: GPL+ or Artistic +Group: Development/Libraries +Summary: Provides Moose-like method modifiers +Source: http://search.cpan.org/CPAN/authors/id/S/SA/SARTAK/Class-Method-Modifiers-%{version}.tar.gz +Url: http://search.cpan.org/dist/Class-Method-Modifiers +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +BuildArch: noarch + +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.42 +BuildRequires: perl(MRO::Compat) +# testing +BuildRequires: perl(Test::Exception) +BuildRequires: perl(Test::More) + + +%description +Method modifiers are a powerful feature from the CLOS (Common Lisp Object +System) world. + +In its most basic form, a method modifier is just a method that calls +'$self->SUPER::foo(@_)'. I for one have trouble remembering that exact +invocation, so my classes seldom re-dispatch to their base classes. Very +bad! + +'Class::Method::Modifiers' provides three modifiers: 'before', 'around', +and 'after'. 'before' and 'after' are run just before and after the method +they modify, but can not really affect that original method. 'around' is +run in place of the original method, with a hook to easily call that +original method. See the 'MODIFIERS' section for more details on how the +particular modifiers work. + +%prep +%setup -q -n Class-Method-Modifiers-%{version} + +find t/ -type f -exec perl -pi -e 's|^#!perl|#!/usr/bin/perl|' {} + + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +rm -rf %{buildroot} + +make pure_install PERL_INSTALL_ROOT=%{buildroot} +find %{buildroot} -type f -name .packlist -exec rm -f {} ';' +find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';' + +%{_fixperms} %{buildroot}/* + +%check +make test + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc Changes t/ +%{perl_vendorlib}/* +%{_mandir}/man3/*.3* + +%changelog +* Mon Sep 08 2008 Chris Weyl 1.01-2 +- bump + +* Sat Sep 06 2008 Chris Weyl 1.01-1 +- initial Fedora packaging +- generated with cpan2dist (CPANPLUS::Dist::Fedora version 0.0.1) diff --git a/sources b/sources index e69de29..9558065 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +f0398c468025d21493745619b1114a46 Class-Method-Modifiers-1.01.tar.gz