Hi Geoffrey,

Am Dienstag, 21. Oktober 2003 15:09 schrieb Geoffrey Young:
> > That was a very good hint. It allows me to keep the perl part into the
> > apache directives as desired. But my @INC path is still wrong.
>
> hmm.
>
> ok, how about you show us a few things, like all of modperl_inc.pl, then
> what directories you would like included that are missing.  and also show
> us your @INC.

My problem is if have a large project ( Apache::PageKit ) that works currently 
with perl < 5.6.1, perl > 5.6.1 but < 5.8 and perl >= 5.8. Thats no problem, 
but a newbie can not install it propper. So my intent is a installation 
process that does a the right thing for the installed version of perl. Since 
I prefer a automatic solution I test the version of perl and apply all needed 
patches to Apache::PageKit during the 'make' phase. That leads to different 
version of Apache:PageKit in the lib and blib/lib directories. With the 
current version of Apache::Test the version in lib is tested. But 'make 
install' installs the version from blib/lib. And depending from your perl 
they are different.

I reported that to Stas and he explaind that the lib path is hardcoded to make 
development easier. As a solution he suggest a ENV var that when set prefer 
the lib dir for development.

Then Stas kindly produce a patch that I tested today against Apache::Test 
1.04.

>
> if the libraries are properly specified in modperl_inc.pl but not in @INC,
> that's one thing.  if they are not in modperl_inc.pl that's another.  right
> now, I'm unclear as to what the problem is exactly.
>

In short lib is searched before blib/lib. I had a workaround that overwrites 
some routines in Apache::Test but it is really uggly and may not work taht 
long. Im happy that Stas is now looking into the problem.

my  modperl_onc.pl contains this lines:
###### modperl_inc.pl

use lib '/tmp/ap_ex/blib/arch';
use lib '/tmp/ap_ex/blib/lib';
1;

##### extra.last.conf.in
<Location />
SetHandler perl-script
PerlSetVar PKIT_ROOT @ServerRoot@/../eg
PerlSetVar PKIT_SERVER staging
PerlHandler +Apache::PageKit
<Perl>
use Apache::PageKit;
 Apache::PageKit->startup('@ServerRoot@/../eg','staging');
</Perl>
</Location>

and here is my @INC as you can see loaded from lib and not from blib/lib as 
desired.

Can't locate Text/Iconv.pm in @INC (@INC contains: /tmp/ap_ex/Apache-Test/
lib /tmp/ap_ex/lib /tmp/ap_ex/blib/lib /tmp/ap_ex/blib/arch /home/ptest/lib/
perl5/5.8.1/i686-linux-thread-multi /home/ptest/lib/perl5/5.8.1/
i686-linux-thread-multi /home/ptest/lib/perl5/5.8.1 /home/ptest/lib/perl5/
site_perl/5.8.1/i686-linux-thread-multi /home/ptest/lib/perl5/
site_perl/5.8.1/i686-linux-thread-multi /home/ptest/lib/perl5/
site_perl/5.8.1 /home/ptest/lib/perl5/site_perl/5.8.1/
i686-linux-thread-multi /home/ptest/lib/perl5/site_perl/5.8.1 /home/ptest/
lib/perl5/site_perl . /home/ptest/lib/perl5/5.8.1/i686-linux-thread-multi /
home/ptest/lib/perl5/5.8.1 /home/ptest/lib/perl5/site_perl/5.8.1/
i686-linux-thread-multi /home/ptest/lib/perl5/site_perl/5.8.1 /home/ptest/
lib/perl5/site_perl .) at /tmp/ap_ex/lib/Apache/PageKit.pm line 21.


> --Geoff

-- 
Boris

Reply via email to