BW::Base - Base routines for BW::* modules
BW-Lib (collectively, the BW::* module tree) is a set of perl modules developed by Bill Weinman over the course of about 15 years. It provides a uniform interface for a number of common functions, most of which are available elsewhere with other interfaces.
This library duplicates the functionality of a number of other common modules, so there is very little here that is unique. It's not designed to be "better" -- only more uniform, and therefor easier to use (at least I find it so).
It's on CPAN so that it can be easily installed for the various applications that I distribute that use it.
The BW::Base class provides common methods inhereted by the other modules in the BW::* tree. It is not designed to be used directly.
Constructs a new BW::* object while providing optional object properties. This method is commonly inherited by BW::* classes and is rarely overriden.
Called by new() and designed to populate object properties using the corresponding setters. _init() is typically inherited by BW::* classes and is occiasionally augmented, but rarely overridden.
A convenience method called by the various setter/getters like this:
sub foo { BW::Base::_setter_getter(@_); }
_setter_getter() uses caller() to get the name of the calling sub and uses that name for the associated property.
Used to write lines to a web log, debug() prints to STDERR and uses caller() to get the name of the calling sub.
Use for setting error messages. Returns FAILURE so that it may be called like:
if( $badness ) { return $self->_error("I've been bad"); }
Returns and clears the object error message.
Used for checking errors from other BW::* modules. Returns FAILURE and sets an error (using $self-_error()>) or SUCCESS if no error found.
Written by Bill Weinman <http://bw.org/>.
Copyright (c) 1995-2010 The BearHeart Group, LLC
See HISTORY file.
To install BW::CGI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm BW::CGI
CPAN shell
perl -MCPAN -e shell install BW::CGI
For more information on module installation, please visit the detailed CPAN module installation guide.