BSD Ports

devel/p5-Class-Method-Modifiers 2.15 FreeBSD

Provides Moose-like method modifiers

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
License
ART10, GPLv1+
Categories
devel, perl5
Package size
18.7 KiB, 58.3 KiB installed

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.

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.

In the other systems

SystemPortVersion
FreeBSDdevel/p5-Class-Method-Modifiers2.15
OpenBSDdevel/p5-Class-Method-Modifiers2.15
NetBSDdevel/p5-Class-Method-Modifiers2.15nb4
DragonFlydevel/p5-Class-Method-Modifiers2.15
MidnightBSDdevel/p5-Class-Method-Modifiers2.15

Install

Binary package:

pkg install p5-Class-Method-Modifiers

From the ports tree:

cd /usr/ports/devel/p5-Class-Method-Modifiers/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	p5-Class-Method-Modifiers>0:devel/p5-Class-Method-Modifiers

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest2.152.152.132.152.15
FreeBSD:14:quarterly2.152.15n/a2.152.15
FreeBSD:15:latest2.152.15n/a2.152.15
FreeBSD:15:quarterly2.152.15n/an/an/a
FreeBSD:16:latest2.152.15n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Test 1

The full lists below include those, and their dependencies in turn.

Build dependencies 1
Run dependencies 1
Required by 663

The first 100 are listed.

Configuration

No options to configure.

USES
perl5
Service scripts
none

Files

pkg-plist 2
  • %%SITE_PERL%%/Class/Method/Modifiers.pm
  • %%PERL5_MAN3%%/Class::Method::Modifiers.3.gz
distinfo 1
FileSizeSHA256
Class-Method-Modifiers-2.15.tar.gz4116765cd85bfe475d066e9186f7a8cc636070985b30b0ebb1cde8681cf062c2e15fc
Master sites 1
  • CPAN

Commit history 0

No commits in the history this site was built from.