Hi,

Simple problem, I had a quick search thorugh the archives and a good delve into the 
perl website, no joy.
(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

Reply via email to