On Thu, 17 Mar 2005 14:57:24, Geoffrey Young <[EMAIL PROTECTED]> wrote: > just added to svn is $ENV{MOD_PERL_API_VERSION}, which is currently just "2".
Cool. > what exactly is the issue you guys are trying to work around? I'm writing code that's intended to work under both MP1 and MP2. To split off into the right module or section of code, I ask things like, "Am I running in a mod_perl environment?" and "Am I in mod_perl 1 or 2?" I'm not sure I understand the problems with using an environment variable for this, but I'd be happy to see something better. I'm basically just looking for "officially blessed", "canonical" ways to ask those questions. Looking at $ENV{'MOD_PERL'} is mostly fine with me, but it does bother me that I have to strip out the version using a regex and then compare it to 1.99. (What if the format of that string changes someday?) $ENV{'MOD_PERL_API_VERSION'} will help there, I think. -John