8
0

Accepting request 89450 from home:tabraham1:Factory

update to 1.08

OBS-URL: https://build.opensuse.org/request/show/89450
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Class-Method-Modifiers?expand=0&rev=9
This commit is contained in:
Lars Vogdt
2011-10-27 09:32:02 +00:00
committed by Git OBS Bridge
parent 82dde3be0c
commit 98a44ee43c
4 changed files with 76 additions and 21 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:90f8f9c662b5b23b8004ccb852dc763a5030cce66ff48f7b738c1bffd3c19324
size 25261

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:98727f5e06d4d4b91ee6dea588a2f772b51ad3f75e47988cef18078f8bc3df4a
size 27525

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Oct 26 19:55:53 UTC 2011 - tabraham@novell.com
- updated to 1.08 Sun Oct 16 2011
- document install_modifier (requested by Tokuhiro Matsuno)
------------------------------------------------------------------- -------------------------------------------------------------------
Wed May 11 14:54:44 UTC 2011 - dbahi@novell.com Wed May 11 14:54:44 UTC 2011 - dbahi@novell.com

View File

@@ -15,32 +15,88 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
# norootforbuild
Name: perl-Class-Method-Modifiers Name: perl-Class-Method-Modifiers
%define cpan_name Class-Method-Modifiers Version: 1.08
Summary: Provides Moose-like method modifiers
Version: 1.07
Release: 1 Release: 1
License: GPL+ or Artistic License: GPL+ or Artistic
Group: Development/Libraries/Perl %define cpan_name Class-Method-Modifiers
Summary: provides Moose-like method modifiers
Url: http://search.cpan.org/dist/Class-Method-Modifiers/ Url: http://search.cpan.org/dist/Class-Method-Modifiers/
#Source: http://www.cpan.org/authors/id/S/SA/SARTAK/Class-Method-Modifiers-%{version}.tar.gz Group: Development/Libraries/Perl
Source: %{cpan_name}-%{version}.tar.bz2 Source: http://www.cpan.org/authors/id/S/SA/SARTAK/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: perl BuildRequires: perl
BuildRequires: perl-macros BuildRequires: perl-macros
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.42
BuildRequires: perl(Test::Fatal) BuildRequires: perl(Test::Fatal)
#BuildRequires: perl(Carp)
#BuildRequires: perl(Class::Method::Modifiers)
#BuildRequires: perl(Config)
#BuildRequires: perl(Cwd)
#BuildRequires: perl(Exporter)
#BuildRequires: perl(ExtUtils::Manifest)
#BuildRequires: perl(ExtUtils::MM_Cygwin)
#BuildRequires: perl(ExtUtils::MM_Unix)
#BuildRequires: perl(ExtUtils::MM_Win32)
#BuildRequires: perl(Fcntl)
#BuildRequires: perl(File::Basename)
#BuildRequires: perl(File::Find)
#BuildRequires: perl(FileHandle)
#BuildRequires: perl(File::Path)
#BuildRequires: perl(File::Spec)
#BuildRequires: perl(FindBin)
#BuildRequires: perl(inc::Module::Install)
#BuildRequires: perl(JSON)
#BuildRequires: perl(LWP::Simple)
#BuildRequires: perl(Module::Build)
#BuildRequires: perl(Module::Install::Base)
#BuildRequires: perl(Net::FTP)
#BuildRequires: perl(Parse::CPAN::Meta)
#BuildRequires: perl(Socket)
#BuildRequires: perl(Test::More)
#BuildRequires: perl(vars)
#BuildRequires: perl(YAML::Tiny)
%{perl_requires}
%description %description
Method modifiers are a powerful feature from the CLOS (Common Lisp Object Method modifiers are a convenient feature from the CLOS (Common Lisp Object
System) world. 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.
One clear benefit of using 'Class::Method::Modifiers' is that you can
define multiple modifiers in a single namespace. These separate modifiers
don't need to know about each other. This makes top-down design easy. Have
a base class that provides the skeleton methods of each operation, and have
plugins modify those methods to flesh out the specifics.
Parent classes need not know about 'Class::Method::Modifiers'. This means
you should be able to modify methods in _any_ subclass. See the
Term::VT102::ZeroBased manpage for an example of subclassing with CMM.
In short, 'Class::Method::Modifiers' solves the problem of making sure you
call '$self->SUPER::foo(@_)', and provides a cleaner interface for it.
As of version 1.00, 'Class::Method::Modifiers' is faster in some cases than
the Moose manpage. See 'benchmark/method_modifiers.pl' in the the Moose
manpage distribution.
%prep %prep
%setup -q -n %{cpan_name}-%{version} %setup -q -n %{cpan_name}-%{version}
find . -type f -print0 | xargs -0 chmod 644
%build %build
%{__perl} Makefile.PL INSTALLDIRS=vendor %{__perl} Makefile.PL INSTALLDIRS=vendor
@@ -51,18 +107,11 @@ System) world.
%install %install
%perl_make_install %perl_make_install
# do not perl_process_packlist (noarch) %perl_process_packlist
# remove .packlist file
%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
# remove perllocal.pod file
%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib
%perl_gen_filelist %perl_gen_filelist
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files -f %{name}.files %files -f %{name}.files
%defattr(-,root,root,-) %defattr(-,root,root,755)
%doc Changes %doc Changes
%changelog %changelog