CGI::Widget - Base class for CGI::Widget::...
use CGI::Widget qw(:standard); #prints 1,2,3,4, print Series(-length=>4,-render=>sub{return shift.','});
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 a CGI::Widget import tag, as: use CGI::Widget qw(:standard); print Series(),"\n"; #constructs CGI::Widget::Series print HList__Node,"\n"; #constructs CGI::Widget::HList::Node
you can construct CGI::Widget subclasses by name. Deeper subclasses can be constructed by replacing double-colon (::) with double-underscore (__).
A modified AUTOLOADer is exported. How the autoloader functions depends on what import tags with which CGI::Widget was brought into the namespace. The first import tag is used, while additional tags are silently ignored. Tag Returns -------------------------- :standard HTML :html HTML :wml WML :javascript javascript
Thanks to Slaven Rezic for valuable ideas.
Allen Day E<allenday@ucla.edu> Copyright (c) 2001.
Perl. CGI::Widget::Series
To install CGI::Widget, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CGI::Widget
CPAN shell
perl -MCPAN -e shell install CGI::Widget
For more information on module installation, please visit the detailed CPAN module installation guide.