Colin Kong > LibWeb-0.02 > LibWeb::Class

Download:
LibWeb-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

LibWeb::Class - A base class for libweb modules

SUPPORTED PLATFORMS ^

BSD, Linux, Solaris and Windows.

REQUIRE ^

ISA ^

SYNOPSIS ^

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

ABSTRACT ^

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 ^

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 ^

Colin Kong (colin.kong@toronto.edu)

CREDITS ^

Lincoln Stein (lstein@cshl.org)

BUGS ^

SEE ALSO ^

syntax highlighting: