Re: [WISH] A Perlish way to detect mod_perl major version (= not $ENV{MOD_PERL})

[prev] [thread] [next] [Date index for 2005/03/17]

From: John Siracusa
Subject: Re: [WISH] A Perlish way to detect mod_perl major version (= not $ENV{MOD_PERL})
Date: 19:45 on 17 Mar 2005
On Thu, 17 Mar 2005 17:39:21, Dominique Quatravaux <dom@xxxxxx.xxx> wrote:
> For the record I use the following dubious hack as an interim measure:
> 
> sub modperl_major_version {
> ~    use DynaLoader ();
> ~    return 1 if DynaLoader::dl_find_symbol_anywhere("XS_Apache_define");
> ~    return 2 if
> DynaLoader::dl_find_symbol_anywhere("XS_ModPerl__Util_exit");
> ~    return undef;
> }

I have a function with almost exactly the same name, but I'm stripping the
version out of the environment variable.  I'd also like to see a "cleaner"
way to do this.  The DynaLoader method is not particularly reassuring... :)

-John


Re: [WISH] A Perlish way to detect mod_perl major version (= not $ENV{MOD_PERL})
John Siracusa 19:45 on 17 Mar 2005

Generated at 15:10 on 27 Mar 2005 by mariachi v0.52