On Thu, 21 Oct 2004 14:15:37 -0400, Michael <[EMAIL PROTECTED]> wrote:
> Rob Kinyon wrote:
> > Also, and I know this may be more trouble than it's worth, but it
> > might be useful to write a C::A::Plugin::Apache2 so that both AP1 and
> > AP2 can be supported easily. I'm not sure if there's an environment
> > variable or some other test that could be used to see if the module is
> > being pulled into a mp1 or mp2 environment. If that were the case,
> > then the C::A::P::Apache should probably delegate to C::A::P::Apache1
> > vs. C::A::P::Apache2, if possible.
> 
> Not more trouble then it's worth, but maybe more than I can do right
> now. :) I'll need to get a mod_perl2 setup going before I can really do
> any targeted development for it. And yes there is an environment var
> that most of the modules look at when trying to do both. I'll probably
> just keep it in the same module and alter it's behavior accordingly.

Hi Michael,

If you are already checking to see which version of mod_perl is
running, then I think it would probably also be useful to detect if
mod_perl is NOT available!  If it is not, maybe your plugin can
gracefully get out of the way, and let the application work with the
standard CGI.pm module.  I think you can just look at $ENV{MOD_PERL}
for whether mod_perl is running, and what version is being used.

This would allow app developers to put the C::A::P::Apache plugin in
all their apps, and use it in a CGI and mod_perl environment without
any code changes.

Cheers,

-- 
Cees Hek

---------------------------------------------------------------------
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]

Reply via email to