[cgiapp] cgiapp with Net::Server

Mark Fuller azfuller at gmail.com
Sun Mar 9 19:49:17 EDT 2008


On Sun, Mar 9, 2008 at 4:17 PM, Ron Savage <ron at savage.net.au> wrote:
>  The sample code uses Net::Server::PreFork. I'm not sure, but if you have
>  multiple server processes waiting for connexions, it's possible the
>  first run mode is run inside one process, and the second run mode is run
>  inside a different process, right? That would explain how a run mode is
>  fixed inside a given process.

I don't know. But, each process has the correct environment. For
example if you add "print $ENV{REQUEST_URI}" to Turston's WebApp.pm
(in each run-mode method), it will show that the URI has the correct
run mode. But, that's *not* the runmode C:A knows about.

It seems like CGI.pm is remaining persistent. But, I don't understand
why because the WebApp.pm is created "new" each time.

And, like I said, if you add "my $q = $self->query()" somewhere in
WebApp.pm the odd behavior stops. It also stops if I add a
"cgiapp_get_query" method to use CGI::Simple.

Turston's ok with using fork instead of PreFork. It's still puzzling
though. And beyond my capability to figure out.

Mark


More information about the cgiapp mailing list