CGI::Application instance scripts are refreshingly brief e.g.
put this in your application module -
it will be executed when the module is used
But this can be abbreviated even more ...use My::App; my $app = My::App->new; $app->run;
Now your instance script looks like thissub import { __PACKAGE__->new->run }
use My::App; # yes that's it!
Back to
Cool Uses for Perl