On Sat, 13 May 2000, Robert Nice wrote:

> Hi,
> 
> Simple problem, I had a quick search thorugh the archives and a good
> delve into the perl website, no joy. 

You didn't delve deep enough, perl.apache.org/index.html reveals no
mod_perl specific info.

Guide is your guide into mod_perl. The answer to your question is there:
http://perl.apache.org/guide/porting.html#_INC_and_mod_perl

> (Using modPerl 1.23)
> 
> #!/usr/bin/perl -w
> 
> use lib '../site_perl';
> use CGI;
> 
> my $cgi = new CGI;
> print $cgi->header;
> print join("<br>\n", @INC);
> -----------------------------------------------------------
> First time (compiling run):
> ../site_perl
> /usr/lib/perl5/5.00503/i386-linux
> /usr/lib/perl5/5.00503
> /usr/lib/perl5/site_perl/5.005/i386-linux
> /usr/lib/perl5/site_perl/5.005
> .
> /etc/httpd/
> /etc/httpd/lib/perl
> ------------------------------------------------------------
> Second run :
> /usr/lib/perl5/5.00503/i386-linux
> /usr/lib/perl5/5.00503
> /usr/lib/perl5/site_perl/5.005/i386-linux
> /usr/lib/perl5/site_perl/5.005
> .
> /etc/httpd/
> /etc/httpd/lib/perl
> -----------------------------------------------------------
> 
> In other words my 'use lib' line disappears. I can understand why. You typically 
>won't need it after
> it's already been compiled. I've been happily using modPerl for ages and this
> hasn't caused a problem. My company however newly requires that I speak to 25 
>different credit card
> processors and I wanted to pull them in with 'eval "require $classname"' statements 
>like LWP does
> with net protocols. For efficency
> I'd like to compile them when needed not in bulk on the first run.
> I'd also prefer not to put my libraries in the system library area as it defeats my 
>development
> setup of having test and beta libraries on the same machine.
> I've got a workaround (I force them all to load on the first run if under modPerl), 
>however I
> thought I'd post, might be something for the developers to think about.
> 
> Cheers,
> 
> Robert Nice
> Technical Director
> WebsiteBilling.com Inc
> 



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

Reply via email to