Nick Tonkin wrote:
Any preference between these two methods of finding out what version
of mod_perl we are running under?

And should we document both in the porting tutorial, or is it better
to just pick one?

We need both.


$mod_perl::VERSION tells you the exact version. And it can be queried by any non-mod_perl app. You can pick a wrong $mod_perl::VERSION if you have both mp installed.

Apache::exists_config_define("MODPERL2") is available only after mod_perl.so was loaded (a bit after that), and it's always correct. So this is probably a preferrable way to figure out the mod_perl generation.

But the real use for this API is in httpd.conf:

<!IfDefine MODPERL2>
   ...
</IfDefine>

What I don't like about it is that it's called MODPERL2 and not MOD_PERL2. At some point I'm going to walk through all the defines that we use and change them s/MODPERL/MOD_PERL/ as discussed before.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to