This perl module provides a clone() method which makes recursive copies
of nested hash, array, scalar and reference types, including tied
variables and objects.
Class::Method::Modifiers::Fast 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.
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.
The "mix_class" function provided by this module dynamically generates
`anonymous' classes with specified inheritance.
This module is an alternative to Class::Singleton and
Class::WeakSingleton, and provides a more secure Singleton class in that
it takes steps to prevent the possibility of accidental creation of
multiple instances and/or the overwriting of existing Singleton
instances.
This distribution facilitates the run-time generation of classes which
inherit from a base class and some optional selection of mixin classes.
A factory is provided to generate the mixed classes with multiple
inheritance. A NEXT method allows method redispatch up the inheritance
chain.
The Class:Multimethod module exports a subroutine (&multimethod) that can
be used to declare other subroutines that are dispatched using a algorithm
different from the normal Perl subroutine or method dispatch mechanism.
Normal Perl subroutines are dispatched by finding the appropriately-named
subroutine in the current (or specified) package and calling that. Normal
Perl methods are dispatched by attempting to find the appropriately-named
subroutine in the package into which the invoking object is blessed or,
failing that, recursively searching for it in the packages listed in the
appropriate @ISA arrays.
Class::Multimethods multimethods are dispatched quite differently. The
dispatch mechanism looks at the classes or types of each argument to the
multimethod (by calling ref on each) and determines the "closest" matching
variant of the multimethod, according to the argument types specified in
the variants' definitions (see "Finding the "nearest" multimethod" for a
definition of "closest").
This module offers a minimalist class construction kit in around 120
lines of code.
Class::NamedParms
Provides standard get/set/clear accessors for a class via named
parameter with forced lexical checking of named parameters
for validity and initialization validation. Lightweight and simple
to use. Designed as a base class for inheritance by other modules.
Perl module which implements the Null Class design pattern