Re: mod_perl, "use lib", and stuff ...



nobull@xxxxxxxx wrote:

Alternatively have a separate Apache instance per version.

This is (probably) the simplest thing to do.

You can have one set of Apache executables and one set of web-site files, but multiple Apache configs (although most of that can be common too - just Include the majority of your config into a little file which has a:

 <Perl>
   use lib qw( /the/dir/I/want/for/this/one );
 </Perl>

section in it), each setting different @INC in the configs. Run them on different ports to select which version you want.

In mod_perl2 there's apparently a way of defining multiple pools of
Perl servers (and I believe you can set @INC differently in each) and
then assigning those pools to different virtual directories.

parent and clone options to a Perl* var IIRC.

Also, I have a vague feeling that '.' isn't on @INC in mod_perl2 (may be wrong - enable perl-status to check...)




-- Just because I've written it doesn't mean that either you or I have to believe it. .