NAME
CGI::Widget - Base class for CGI::Widget::...
SYNOPSIS
use CGI::Widget qw(:standard);
#prints 1,2,3,4,
print Series(-length=>4,-render=>sub{return shift.','});
DESCRIPTION
The CGI::Widget module's purpose is to allow authors of CGI or other dynamically generated HTML documents an easy way to create common, and possibly complex, page elements.
Widgets can be accessed either by explicitly creating Widget objects, as:
use CGI::Widget::Series;
my $series_widget = CGI::Widget::Series->new();
print $series_widget,"\n";
or by using the CGI::Widget standard import tag, as: use CGI::Widget qw(:standard); print Series(),"\n"; #constructs CGI::Widget::Series print HList__Node,"\n"; #constructs CGI::Widget::HList::Node
Using ':standard' uses an AUTOLOAD subroutine that tries to construct an object for you that resides under CGI::Widget. For subclasses of CGI::Widget subclasses and subclasses thereof, a double underscore (__) must be given in place of the normal double colon (::) used to delimit package names. If someone knows a better way to do this, let me know!
EXPORT
:standard : AUTOLOAD for classes in the CGI::Widget namespace.
ACKNOWLEDGMENTS
Thanks to Slaven Rezic for valuable ideas.
AUTHOR
Allen Day E<allenday@ucla.edu>
Copyright (c) 2001.