Path to this page:
./
devel/p5-Class-Base,
Useful base class for deriving other modules
Branch: pkgsrc-2012Q2,
Version: 0.04,
Package name: p5-Class-Base-0.04,
Maintainer: pkgsrc-usersThis module implements a simple base class from which other modules
can be derived, thereby inheriting a number of useful methods such
as new(), init(), params(), clone(), error() and debug().
For a number of years, I found myself re-writing this module for
practically every Perl project of any significant size. Or rather,
I would copy the module from the last project and perform a global
search and replace to change the names. Each time it got a little
more polished and eventually, I decided to Do The Right Thing and
release it as a module in it's own right.
It doesn't pretend to be an all-encompassing solution for every
kind of object creation problem you might encounter. In fact, it
only supports blessed hash references that are created using the
popular, but by no means universal convention of calling new() with
a list or reference to a hash array of named parameters. Constructor
failure is indicated by returning undef and setting the $ERROR
package variable in the module's class to contain a relevant message
(which you can also fetch by calling error() as a class method).
Master sites: (Expand)
SHA1: 162353f29e8191f674bc17095a394f8247457707
RMD160: 30bbd1022cf24550c2a5b1fed373c34d0f589690
Filesize: 12.632 KB
Version history: (Expand)
- (2012-07-05) Package added to pkgsrc.se, version p5-Class-Base-0.04 (created)