Re: @INC and mod_perl - PerlSetEnv PERL5LIB ... doesn't seem to work

2001-04-12 Thread Keith G. Murphy

Stas Bekman wrote:
 
 On Wed, 11 Apr 2001, Keith G. Murphy wrote:
 
  Vivek Khera wrote:
  
"TS" == Tim Sweetman [EMAIL PROTECTED] writes:
  
   TS you can add directories to @INC by putting
  
   TS PerlSetEnv PERL5LIB /home/httpd/perl
  
   Just use the second method in the guide.  ie, use lib '/path/to/lib'
   in a startup script.
  
  I request that the guide be changed, since apparently the 'PerlSetEnv'
  way hasn't worked properly for some time.  Never has for me, anyway.
 
 Do you have the taint mode turned on? I think at some point mod_perl
 ignores PERL5LIB settings then. Can you confirm that?
 
It seems to be working like a charm for me now.  :-)
I regret the false imputation...
The root of my misunderstanding was that I did not realize that when I
would start apache by hand, it was getting PERL5LIB from my shell
environment.
Then, when the system would reboot, and start Apache, it didn't have it!
So I probably just had things misconfigured (like using 'SetEnv' instead
of 'PerlSetEnv'), and mistakenly concluded that 'use lib' was the only
thing that works reliably.
I could never really debug the problem properly, since everything always
worked by hand.
Then when I saw Tim's post, it seemed to confirm what I already thought
I knew.
Shows what assuming will do.  Hee-haw.  ;-)



Re: @INC and mod_perl - PerlSetEnv PERL5LIB ... doesn't seem to work

2001-04-12 Thread Keith G. Murphy

Stas Bekman wrote:
 
 On Wed, 11 Apr 2001, Keith G. Murphy wrote:
 
  Vivek Khera wrote:
  
"TS" == Tim Sweetman [EMAIL PROTECTED] writes:
  
   TS you can add directories to @INC by putting
  
   TS PerlSetEnv PERL5LIB /home/httpd/perl
  
   Just use the second method in the guide.  ie, use lib '/path/to/lib'
   in a startup script.
  
  I request that the guide be changed, since apparently the 'PerlSetEnv'
  way hasn't worked properly for some time.  Never has for me, anyway.
 
 Do you have the taint mode turned on? I think at some point mod_perl
 ignores PERL5LIB settings then. Can you confirm that?
 
Ah, I just noticed something else.  If I *am* running a startup script
that 'use's modules that are in my PERL5LIB, I must do 'use lib', or the
script fails to load them.  So 'PerlSetEnv PERL5LIB' is  pretty much
useless (because not sufficient and redundant to 'use lib') in this
case.

That's probably normal and to-be-expected, but it would be nice if it
were actually documented.



Re: @INC and mod_perl - PerlSetEnv PERL5LIB ... doesn't seem to work

2001-04-11 Thread Keith G. Murphy

Vivek Khera wrote:
 
  "TS" == Tim Sweetman [EMAIL PROTECTED] writes:
 
 TS you can add directories to @INC by putting
 
 TS PerlSetEnv PERL5LIB /home/httpd/perl
 
 Just use the second method in the guide.  ie, use lib '/path/to/lib'
 in a startup script.
 
I request that the guide be changed, since apparently the 'PerlSetEnv'
way hasn't worked properly for some time.  Never has for me, anyway.



Re: @INC and mod_perl - PerlSetEnv PERL5LIB ... doesn't seem to work

2001-04-11 Thread I Told You So

 Vivek Khera wrote:
 
   "TS" == Tim Sweetman [EMAIL PROTECTED] writes:
 
  TS you can add directories to @INC by putting
 
  TS PerlSetEnv PERL5LIB /home/httpd/perl

Thanks Vivek, but I was after clarification of whether this was a bug
(to be fixed) or inaccurate docs (also to be fixed). I'd also appreciate
knowing if the "set the env. variable before Apache run"
approach (ie. PERL5LIB=/usr/lib/foo httpsd ...) works, or whether this
is going to be blown out of the water by subsequent mod_perl versions
(though this may be currently unknowable, or known by very few people).
:)

On a related note (preloading in startup scripts), presumably packages
which use AutoLoader/SelfLoader will do a fairly half-baked job of
preloading. Should this pair have some kind of compile() functionality?
(Not saying I'd implement it, but IF we turn out to need it, and nobody
else has, and people think it's a good idea...)

Cheers

--
Tim Sweetman
A L Digital



Re: @INC and mod_perl - PerlSetEnv PERL5LIB ... doesn't seem to work

2001-04-11 Thread Roger Espel Llima

I Told You So [EMAIL PROTECTED] wrote:
 I'd also appreciate knowing if the "set the env. variable before
 Apache run" approach (ie. PERL5LIB=/usr/lib/foo httpsd ...) works,
 or whether this is going to be blown out of the water by
 subsequent mod_perl versions (though this may be currently
 unknowable, or known by very few people).  :)

It works for me at least.  I'm PERL5LIB to keep several versions of
mod_perl's modules on the same system; the first one I installed
(mod_perl 1.21) installed itself under the default location
(/usr/lib/perl5/site_perl/Apache), and then when I needed to setup 
another Apache with a more recent mod_perl, I prepared it with

perl Makefile.PL APACHE_SRC=../apache_1.3.19/src DO_HTTPD=1 USE_APACI=1 \
  PREP_HTTPD=1 EVERYTHING=1 \
  LIB=/usr/local/new-apache/perl-lib

and then I added the line
   PERL5LIB=/usr/local/ssl-apache/perl-lib ; export PERL5LIB
to /usr/local/new-apache/bin/apachectl

Looking at /perl-status's Modules page, @INC looks good.

-- 
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html



Re: @INC and mod_perl - PerlSetEnv PERL5LIB ... doesn't seem to work

2001-04-11 Thread Stas Bekman

On Wed, 11 Apr 2001, Keith G. Murphy wrote:

 Vivek Khera wrote:
 
   "TS" == Tim Sweetman [EMAIL PROTECTED] writes:
 
  TS you can add directories to @INC by putting
 
  TS PerlSetEnv PERL5LIB /home/httpd/perl
 
  Just use the second method in the guide.  ie, use lib '/path/to/lib'
  in a startup script.
 
 I request that the guide be changed, since apparently the 'PerlSetEnv'
 way hasn't worked properly for some time.  Never has for me, anyway.

Do you have the taint mode turned on? I think at some point mod_perl
ignores PERL5LIB settings then. Can you confirm that?


_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





Re: @INC and mod_perl - PerlSetEnv PERL5LIB ... doesn't seem to work

2001-04-10 Thread Vivek Khera

 "TS" == Tim Sweetman [EMAIL PROTECTED] writes:

TS you can add directories to @INC by putting

TS PerlSetEnv PERL5LIB /home/httpd/perl


Just use the second method in the guide.  ie, use lib '/path/to/lib'
in a startup script.


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED]   Rockville, MD   +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/