From: Howell, M. <ho...@ra...> - 2003-05-05 22:33:19
|
To make this work, I modified my build process as such: 1. I created a directory named /usr/local/slashVERSION/perl 2. I created a build script that runs (from the slash source directory): $ make install PREFIX=/usr/local/slashVERSION/perl SLASH_PREFIX=/usr/local/slashVERSION This will make the build process install perl modules into the /usr/local/slashVERSION/perl directory. Each subsequent site that I have from a different source code version will have it's own value for VERSION and thus, it's own set of Slash perl modules. 3. I modified each Apache startup script to contain the following line: PERL5LIB="/usr/local/slashVERSION/perl/lib/perl5/site_perl/5.6.1" Unfortunately, mod_perl will only load the first instance of a module found in @INC, and there is no way to separate different versions of Slash from within the same instance. I toyed around with the 'only' module, but that was not the solution that I was looking for. Therefore, in order to run multiple versions of Slash, there must be multiple instances of Apache/mod_perl running, one for each version. My conclusions are based on findings from the perl faq. In perlfaq8 (see: 'man perlfaq8'), near the bottom, I found: How do I keep my own module/library directory? When you build modules, use the PREFIX option when generating Makefiles: perl Makefile.PL PREFIX=/u/mydir/perl then either set the PERL5LIB environment variable before you run scripts that use the modules/libraries (see the perlrun manpage) or say use lib '/u/mydir/perl'; This is almost the same as BEGIN { unshift(@INC, '/u/mydir/perl'); } except that the lib module checks for machine-dependent subdirectories. See Perl's the lib manpage for more information. How do I add the directory my program lives in to the module/library search path? use FindBin; use lib "$FindBin::Bin"; use your_own_modules; How do I add a directory to my include path at runtime? Here are the suggested ways of modifying your include path: the PERLLIB environment variable the PERL5LIB environment variable the perl -Idir command line flag the use lib pragma, as in use lib "$ENV{HOME}/myown_perllib"; The latter is particularly useful because it knows about machine dependent architectures. The lib.pm pragmatic module was first included with the 5.002 release of Perl. So far, both sites appear to be running fine. -Mark -----Original Message----- From: Vl...@ge... [mailto:vl...@ge...] Sent: Thursday, May 01, 2003 7:18 PM To: Howell, Mark Subject: RE: [Slashcode-development] Running multiple Slash versions on a single box > -----Original Message----- > From: sla...@li... > [mailto:sla...@li...]On Behalf Of > Howell, Mark > Sent: Thursday, May 01, 2003 2:29 PM > To: sla...@li... > Subject: [Slashcode-development] Running multiple Slash versions on a > single box > > > Hello All, > > I am attempting to install and run multiple versions of > Slashcode on the > same machine. Good luck. I for one do not believe this can be done. We have just 2 versions of perl on our box, and have a large number of problems as a result (Psst! Jamie, are you still willing to log in and look at that for us? :-) and are trying to get down to JUST the version that slash is supposed to be using. I think the only way you could really do this would be to jail perl, apache, mysql, etc - in short, you'd have to waste a BOAT LOAD of space for each site. Scott -- /"\ / For information and quotes, email us at \ / ASCII RIBBON CAMPAIGN / in...@lr... X AGAINST HTML MAIL / http://www.lrsehosting.com/ / \ AND POSTINGS / vl...@lr... ------------------------------------------------------------------------- [ALERT] -- Access Manager: This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is prohibited. If you have received this e-mail in error, please immediately notify us by calling our North American Help Desk at (972)506-3939. |