I was wondering if there was any benefit in this kind of interface
use Class::CGI
handlers => {
customer => 'Class::CGI::Customer',
email => 'Email::Loader'
};
my $cgi = Class::CGI->new;
my $customer = $cgi->customer(); # dispatch to C::C::C
my $email = $cgi->email(); # dispatch to E::L
my @sports = $cgi->param('sports'); # as per usual
# validate email
$customer->email($email);
$customer->save;
Surmising, if you've declared the handlers, perhaps you can construct things so that these handlers become methods in this instance of Class::CGI. You just have to come up with a way to make sure the methods are only in this scope of the "use Class::CGI" declaration.
I
...reality must take precedence over public relations, for nature cannot be fooled. - R P Feynmann