[cgiapp] cgi::application::dispatch and modperl
Kurt Lidl
kurt.lidl at cello.com
Mon Oct 11 10:00:38 EDT 2010
On 10/8/2010 12:29 PM, Michael Peters wrote:
> 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.
OK, I'll accept that answer.
But, to follow up the "tighter integration" part of the answer: Is
there a good
example/resource that shows how this is done? I really like the way that I
get the right code running with CGI::Application::Dispatch, but I'd like
to know
where I should be looking to make this go to "the next step".
Thanks for any pointers.
-Kurt
More information about the cgiapp
mailing list