Joe Schaefer wrote:
Hmm, maybe we could have mp2 additionally expose $ENV{MOD_PERL2}?
Then the logic becomes

     if (exists $ENV{MOD_PERL2}) {
        # running mp2

     }
     elsif exists ($ENV{MOD_PERL}) {
        # not mp2; must be mp1 then

     }
     else {
        # normal mode

     }

or whatever. The point I'm trying to make is that the runtime is something we control, so marking the running mod_perl API via some runtime variable should be a workable approach.


While I'm sure my opinion is extremely low on the totem, I'd much prefer:

        $ENV{MOD_PERL} and $ENV{MOD_PERL_VERSION}

But that in and of itself means just checking $ENV{MOD_PERL} in MP1 modules isn't enough, so maybe it's not good to want. :-)

I'm going to show my sillyness. What does $ENV{MOD_PERL} actually contain? I always do if against it, but I've never looked at it's contents. Could $ENV{MOD_PERL} be made to hold the MP version, or would that break to many things?

What happens when MOD_PERL3 comes out? ;-)

-=Chris

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Reply via email to