LibWeb::Class - A base class for libweb modules


LibWeb documentation  | view source Contained in the LibWeb distribution.

Index


NAME

Top

LibWeb::Class - A base class for libweb modules

SUPPORTED PLATFORMS

Top

BSD, Linux, Solaris and Windows.

REQUIRE

Top

ISA

Top

SYNOPSIS

Top

  require LibWeb::Class;
  @ISA = qw(LibWeb::Class);

ABSTRACT

Top

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

DESCRIPTION

Top

METHODS

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
                            );

AUTHORS

Top

Colin Kong (colin.kong@toronto.edu)

CREDITS

Top

Lincoln Stein (lstein@cshl.org)

BUGS

Top

SEE ALSO

Top


LibWeb documentation  | view source Contained in the LibWeb distribution.