Hi,
Does this cgiapp_init get called for each run mode. I put a database
query into this and the resultant strings were put into params. This
slowed down the entire application.
Every stage in CGI::App is executed for every request:
1) create the $app instance
2) run setup, init, prerun, the runmode, teardown
You can think of CGI::App as a HTTP request controller that dispatches
to a certain runmode.
There is no "application-level" setup phase, that would be executed only
once (before the first request). Such a phase has no meaning in
"traditional" CGI, but is of course very useful in FastCGI or mod_perl.
If you want such a phase, (for example to read config files, or query
the database for some initial settings) you have to use other mechanisms
in addition to what CGI::App supplies.
Singleton objects that initialize themselves upon first request and then
maintain their state as package globals are an option here.
Again, this is not within the scope of CGI::Application.
Hope that helps,
Thilo
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]