[cgiapp] cgi::application::dispatch and modperl

Michael Peters mpeters at plusthree.com
Fri Oct 8 12:29:12 EDT 2010


On 10/08/2010 11:12 AM, Kurt Lidl wrote:

> Now this is all basically working, but not exactly as I would expect.
> I see that for request that comes in, both cgiapp_init as
> well as cgiapp_prerun get executed, for every request.
 >
> I expected that cgiapp_init would get executed only when
> Apache spawns each child process.  And of course,
> the cgiapp_prerun should be executed for each request.

This is correct behavior. CGI::App executes every stage on every 
request. CGI::App exists independently of mod_perl/Apache and runs it's 
entire cycle during the request part of Apache's cycle. So if you want 
to have tighter integration with Apache/mod_perl you'll need to do that 
yourself in different handlers.

-- 
Michael Peters
Plus Three, LP


More information about the cgiapp mailing list