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 the CGI::Widget standard import tag, as: use CGI::Widget qw(:standard); print Series(),"\n";
Using ':standard' uses an AUTOLOAD subroutine to check for Widget classes in the CGI::Widget namespace. If someone knows of a better way to do this, let me know!
:standard : AUTOLOAD for classes in the CGI::Widget namespace.
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.