isync has asked for the wisdom of the Perl Monks concerning the following question:
as proposed at link and link. What I found out is that this approach executes cgiapp_init() and setup() on *every* request (which isn't desireable as I load my templates there, establish caches etc and these steps should run only once!).use CGI::Fast; while (my $q = new CGI::Fast){ my $app = new MyCGIApplication(QUERY => $q); # this is your CGI::App m +odule $app->run(); }
in cgiapp_postrun() as a kind of garbage-collection. But what it does: it also wipes all my $self->params which I use as constants/configuration throughout the script. Any comments?$self->{__PARAMS} = {}; $self->header_type('header'); $self->header_props( {} );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI::Application under FastCGI (Guru advice needed)
by samtregar (Abbot) on Nov 28, 2007 at 19:57 UTC | |
by isync (Hermit) on Nov 28, 2007 at 23:30 UTC | |
by samtregar (Abbot) on Nov 30, 2007 at 19:36 UTC |