LibWeb::Class - A base class for libweb modules
- BSD, Linux, Solaris and Windows.
-
require LibWeb::Class;
@ISA = qw(LibWeb::Class);
This class contains common object-oriented methods inherited by all LibWeb
modules. It is intended to be ISA by LibWeb modules and extensions and not
used by client codes outside LibWeb.
The current version of LibWeb::Class is available at
http://libweb.sourceforge.net
Several LibWeb applications (LEAPs) have be written, released and are
available at
http://leaps.sourceforge.net
- rearrange()
-
This is not really OO related but makes LibWeb's API look sexy. This is
stolen from CGI.pm and modified. It allows smart rearrangement of
parameters for named parameter calling. This does the rearrangement if the
first parameter begins with a `-'. For example,
sub your_class_method {
my $self = shift;
my ($parameter1, $parameter2, $parameter3);
= $self->rearrange( ['PARA1', 'PARA2', 'PARA3'], @_ );
....
}
and your method will be called as
use your_class;
my $object = new your_class();
$object->your_class_method(
-para1 => $para1,
-para2 => $para2,
-para3 => $para3
);
- Colin Kong (colin.kong(at)utoronto.ca)
-
- Lincoln Stein (lstein(at)cshl.org)
-
|