perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject [mp2] loading Apache2.pm automatically?
Date Thu, 12 Aug 2004 23:59:39 GMT
We have a need to be able to load mp2 modules at the server startup
(e.g. APR::Error), but we are dependent on the users to load
Apache2.pm, without which mp2 modules won't be found (if installed
into Apache2/). So here is a proposal how to solve this problem.

mod_perl will load Apache2.pm by itself, as soon as it starts
perl. For most people it'll just save them the need to type

PerlModule Apache2

For those who will want to adjust @INC before Apache2 is loaded (to find 
a different mp2), there is PerlSwitches, which must be set before perl 
is started. So lets say you want to load your private mp2 (installed at 
/home/stas/perl5/) on a system where there is already mp2 installed 
under /usr/lib/perl5, so your httpd.conf will look like:

LoadModule perl_module modules/mod_perl.so
PerlSwitches -Mlib=/home/stas/perl5/

So the only inconvenience it creates is that you can't do it from your
startup.pl, but must use PerlSwitches. PERL5LIB env var is not
applicable as it's ignored by Perl when -T is in effect.

Can anybody see any potential problems with this solution?

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message