At 8:27 AM -0500 11/1/02, Jesse Erlbaum wrote:
Um ... somebody's missing something here ...Hi Dom --How do you cope with the problem that perl has of running different versions of modules? We have a similiar situation, in that we're running several projects with different sets of perl libraries. We have common code between them. The trouble starts when we're running several sites on the same virtual server. At that point, there's only one copy of the canonical code running, rather than each vhost getting its own copy.The short answer: PERL5LIB Read my earlier messages in this thread. In one I describe the layout of my site architecture which fully accommodates this reality. In a nutshell, each site has its own "modules/" directory in which ALL the modules for a project, including CPAN libraries, are stored. The environment variable PERL5LIB can be set separately for each virtual host (Apache directive "SetEnv" and "PerlSetEnv" for mod_perl users), thereby allowing each site to have its OWN versions of libraries.
Jesse are you saying that you have a single apache server running multiple vhosts with different versions of the same module loaded for different vhosts? Is that actually possible?
I thought that whenever you first require ModuleX it will use the value of PERL5LIB in that context to load it, but the next time a require happens, even if PERL5LIB is different, it will see that the ModuleX is loaded and won't even try to load the one from a different directory. Right?
What I do (with a very limited number of vhosts) is have each vhost proxy to a different backend server which does have its own version of (nearly) everything.
--
Ray Zimmerman / e-mail: [EMAIL PROTECTED] / 428-B Phillips Hall
Sr Research / phone: (607) 255-9645 / Cornell University
Associate / FAX: (815) 377-3932 / Ithaca, NY 14853