From 8eef1346ffd2e39eb3eb8bdabc8ac2ca0597f6d8 Mon Sep 17 00:00:00 2001 From: afresh1 Date: Sat, 5 Apr 2014 06:20:05 +0000 Subject: [PATCH] Bring back p5-Class-Method-Modifiers-2.10 Needed now for p5-Moo From new maintainer Sergey Bronniko --- devel/p5-Class-Method-Modifiers/Makefile | 23 +++++++++++++++++++++++ devel/p5-Class-Method-Modifiers/distinfo | 2 ++ devel/p5-Class-Method-Modifiers/pkg/DESCR | 23 +++++++++++++++++++++++ devel/p5-Class-Method-Modifiers/pkg/PLIST | 5 +++++ 4 files changed, 53 insertions(+) create mode 100644 devel/p5-Class-Method-Modifiers/Makefile create mode 100644 devel/p5-Class-Method-Modifiers/distinfo create mode 100644 devel/p5-Class-Method-Modifiers/pkg/DESCR create mode 100644 devel/p5-Class-Method-Modifiers/pkg/PLIST diff --git a/devel/p5-Class-Method-Modifiers/Makefile b/devel/p5-Class-Method-Modifiers/Makefile new file mode 100644 index 00000000000..8035e2731db --- /dev/null +++ b/devel/p5-Class-Method-Modifiers/Makefile @@ -0,0 +1,23 @@ +# $OpenBSD: Makefile,v 1.8 2014/04/05 06:20:05 afresh1 Exp $ + +COMMENT = provides Moose-like method modifiers + +MODULES = cpan +DISTNAME = Class-Method-Modifiers-2.10 +CATEGORIES = devel + +MAINTAINER = Sergey Bronnikov + +# Perl +PERMIT_PACKAGE_CDROM = Yes + +TEST_DEPENDS = devel/p5-ExtUtils-BuildRC \ + devel/p5-ExtUtils-Config \ + devel/p5-ExtUtils-InstallPaths \ + devel/p5-File-Find-Rule \ + devel/p5-File-Slurp \ + devel/p5-Test-Fatal \ + devel/p5-Try-Tiny \ + converters/p5-JSON + +.include diff --git a/devel/p5-Class-Method-Modifiers/distinfo b/devel/p5-Class-Method-Modifiers/distinfo new file mode 100644 index 00000000000..ae33717943c --- /dev/null +++ b/devel/p5-Class-Method-Modifiers/distinfo @@ -0,0 +1,2 @@ +SHA256 (Class-Method-Modifiers-2.10.tar.gz) = Qg+1P3ifU+zdwXiQsPZIKJOXzO6y3gXwmUmZ/fMp57Y= +SIZE (Class-Method-Modifiers-2.10.tar.gz) = 36008 diff --git a/devel/p5-Class-Method-Modifiers/pkg/DESCR b/devel/p5-Class-Method-Modifiers/pkg/DESCR new file mode 100644 index 00000000000..886114ed040 --- /dev/null +++ b/devel/p5-Class-Method-Modifiers/pkg/DESCR @@ -0,0 +1,23 @@ +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. + +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. + +In short, Class::Method::Modifiers solves the problem of making sure you +call $self->SUPER::foo(@_), and provides a cleaner interface for it. diff --git a/devel/p5-Class-Method-Modifiers/pkg/PLIST b/devel/p5-Class-Method-Modifiers/pkg/PLIST new file mode 100644 index 00000000000..c48aac84e0a --- /dev/null +++ b/devel/p5-Class-Method-Modifiers/pkg/PLIST @@ -0,0 +1,5 @@ +@comment $OpenBSD: PLIST,v 1.4 2014/04/05 06:20:05 afresh1 Exp $ +${P5SITE}/Class/ +${P5SITE}/Class/Method/ +${P5SITE}/Class/Method/Modifiers.pm +@man man/man3p/Class::Method::Modifiers.3p