perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject [mp2] loading 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, 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 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/
PerlSwitches -Mlib=/home/stas/perl5/

So the only inconvenience it creates is that you can't do it from your, 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     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message