Frank Wiles wrote:
BEGIN { use constant MP2 => eval { exists $ENV{MOD_PERL_API_VERSION} and
                            $ENV{MOD_PERL_API_VERSION} >= 2
}; }
In the future, >=2 might matter, but for now its either undef or exactly == 2 which holds for 1.99023 and higher.

src/modules/perl/modperl_env.c
static modperl_env_ent_t MP_env_const_vars[] = {
    MP_ENV_ENT("MOD_PERL", MP_VERSION_STRING),
    MP_ENV_ENT("MOD_PERL_API_VERSION", MP_API_VERSION),
    { NULL }
};

from  lib/ModPerl/Code.pm
 my $api_v = $self->{build}->{API_VERSION};
 print $h_fh qq(#define MP_API_VERSION "$api_v"\n);

from Makefile.PL:
 $build->{API_VERSION} = $mod_perl2::API_VERSION;

from lib/mod_perl2.pm
# easy to parse request time  API version - use
# $mod_perl2::VERSION for more granularity
our $API_VERSION = 2;


--
------------------------------------------------------------------------
Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB  B89E 1324 9B4F EC88 A0BF

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.

Reply via email to