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!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: One line CGI::Application instance script
by diotalevi (Canon) on Apr 21, 2004 at 11:26 UTC | |
by dragonchild (Archbishop) on Apr 21, 2004 at 11:40 UTC | |
by diotalevi (Canon) on Apr 21, 2004 at 12:37 UTC | |
by bart (Canon) on Apr 21, 2004 at 19:40 UTC |