|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
Re^3: In CGI::Application cgiapp_prerun vs. cgiapp_init?by Anonymous Monk |
| on Jul 18, 2012 at 01:21 UTC ( [id://982356]=note: print w/replies, xml ) | Need Help?? |
|
Summary: they're both called on every request. Not sure if it's a change since this thread was posted but the information here doesn't seem to be correct. Its neither, its a matter scoping :) If this is your mod_perl application
cgiapp_init is going to get called with every request, obviously, because you're creating a new object each time -- this is typical Apache::Registry/ModPerl::Registry, running unmodified .cgi's under mod_perl But if your mod_perl application is
Then init/setup is only done once, and only run is done upon every request. So nothing changed, this are working as designed, as they always have. See Understanding the application flow of CGI::Application and CGI::Application::Loop See also the source of CGI::Application::FastCGI <Reveal this spoiler or all in this thread>
If you want to run CGI::Application as mod_perl handlers as I've shown above with persistent object, you will have to reset query, just like CGI::Application::FastCGI
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||