Class::CGI 0.20 review

Download
by rbytes.net on

Class::CGI is a Perl module to fetch objects from your CGI object. SYNOPSIS use Class::CGI handlers => {

License: Perl Artistic License
File size: 17K
Developer: Curtis Poe
0 stars award from rbytes.net

Class::CGI is a Perl module to fetch objects from your CGI object.

SYNOPSIS

use Class::CGI
handlers => {
customer_id => 'My::Customer::Handler'
};

my $cgi = Class::CGI->new;
my $customer = $cgi->param('customer_id');
my $name = $customer->name;
my $email = $cgi->param('email'); # behaves like normal

if ( my %errors = $cgi->errors ) {
# do error handling
}

For small CGI scripts, it's common to get a parameter, untaint it, pass it to an object constructor and get the object back. This module would allow one to to build Class::CGI handler classes which take the parameter value, automatically perform those steps and just return the object. Much grunt work goes away and you can get back to merely pretending to work.

Requirements:
Perl

Class::CGI 0.20 search tags