This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
Subject: Re: Why isn't PerlSetEnv working for me? From: Chris Winters <cwinters@intes.net> Date: Tue, 26 Sep 2000 18:48:51 -0400 Keith G. Murphy (keithmur@mindspring.com) [000926 18:43]: > I'm running Apache 1.3.9 with mod_perl embedded, on Debian GNU/Linux. > > I have the following lines towards the end of my httpd.conf: > > PerlSetEnv PERL5LIB /usr/local/MyPerl/lib > PerlRequire startup.pl > Include perllocs.conf > > However, upon system startup, my startup.pl fails because it can't find > a particular module in the @INC list. > > If I start Apache from the command line, it works. This is undoubtedly > because PERL5LIB is set up in my /etc/profile, to the same path. > > I've looked at this until I'm crosseyed. Seemingly PerlSetEnv just > doesn't work. > > Any ideas? Yes, I know the workaround: 'use lib' in startup.pl. But > why? There's another workaround: in httpd.conf: <Perl> use lib qw( /usr/local/MyPerl/lib ); </Perl> Pretty painless :) === Subject: RE: Why isn't PerlSetEnv working for me? From: "Christian Gilmore" <Christian_Gilmore@tivoli.com> Date: Tue, 26 Sep 2000 18:00:15 -0500 If you have a startup.pl, why not just use lib qw(/usr/local/MyPerl/lib); within the startup.pl script? === Subject: Re: Why isn't PerlSetEnv working for me? From: Stas Bekman <stas@stason.org> Date: Wed, 27 Sep 2000 01:40:10 +0200 (CEST) http://thingy.kcilink.com/modperlguide/config/PerlSetVar_PerlSetEnv_and_PerlP.html Regarding the setting of PerlPassEnv PERL5LIB in httpd.conf: if you turn on taint checks (PerlTaintCheck On), $ENV{PERL5LIB} will be ignored (unset). See the 'Switches -w, -T' section. === Subject: Re: Why isn't PerlSetEnv working for me? From: "Keith G. Murphy" <keithmur@mindspring.com> Date: Wed, 27 Sep 2000 12:10:03 -0500 Stas Bekman wrote: > > http://thingy.kcilink.com/modperlguide/config/PerlSetVar_PerlSetEnv_and_PerlP.html Yes, I have looked at that. > > Regarding the setting of PerlPassEnv PERL5LIB in httpd.conf: if you turn > on taint checks (PerlTaintCheck On), $ENV{PERL5LIB} will be ignored > (unset). See the 'Switches -w, -T' section. > I can explicitly set it *off*: PerlTaintCheck Off and still get the same behavior. Upon further investigation, what I am seeing is that PERL5LIB gets passed into %ENV just fine. It's just not being used to locate modules; it is not in @INC. Could the part of Perl that pushes the PERL5LIB setting to @INC have already executed prior to my PerlSetEnv statement? If so, that would certainly limit the usefulness of PerlSetEnv for that purpose. Maybe some note should be made in the docs. Or can someone confirm that it works for them? ===