Hi,

Am Dienstag, 21. Oktober 2003 09:00 schrieb Stas Bekman:
> Boris Zentner wrote:
> > Hi,
> >
> > A test against my project show's no real difference at all. I applied the
> > patch against Apache-Test-1.04 and I verified that my
> > t/conf/modperl_inc.pl contain the desired lines.
> >
> > use lib '/tmp/ap_ex/blib/arch';
> > use lib '/tmp/ap_ex/blib/lib';
> > 1;
>
> Perfect. You are now talking about a different issue. If you look at
> t/conf/httpd.conf, t/conf/extra.conf is loaded before
> t/conf/modperl_startup.pl (which loads t/conf/modperl_inc.pl and
> t/conf/modperl_inc.pl) that's why you have this problem. What you want to
> do is to move all the code from the <Perl> sections in t/conf/extra.conf.in
> into t/conf/modperl_extra.pl, which is loaded after t/conf/modperl_inc.pl
> and you will be alright.

Ok, I moved the code to modperl_extra.pl.in. But no success. A look into the 
generated httpd.conf shows that modperl_extra.pl is loaded before 
modperl_startup which load modperl_extra again and modperl_inc.

If I remove the perlrequire modperl_extra.pl line and run ./t/TEST, I load 
Apache::PageKit again from ./lib 

 waiting for server to start: ok (waited 0 secs)
server localhost:8529 started
1_dummy....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.

Another point is that if I move the code out of the extra.conf this change 
conditional, that I have to move it out of its context. I can workaround 
this but others may not.

here is a little example:

<Location /xyz>
SetHandler perl-script
PerlSetVar PKIT_ROOT @ServerRoot@/../xyz
PerlSetVar PKIT_SERVER staging
PerlHandler +Apache::PageKit
<Perl>
use Apache::PageKit;
Apache::PageKit->startup;
</Perl>
</Location>

<Location /abc>
SetHandler perl-script
PerlSetVar PKIT_ROOT @ServerRoot@/../abc
PerlSetVar PKIT_SERVER production
PerlHandler +Apache::PageKit
<Perl>
use Apache::PageKit;
Apache::PageKit->startup;
</Perl>
</Location>

in my example above I call Apache::PageKit->startup two times but both get 
different PKIT_ROOT and PKIT_SERVER values from the server. This change, if I 
move it out of the Location directive.

>
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Boris

Reply via email to