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;

my error message is the following:

...
/home/ptest/httpd/bin/httpd -X -d /tmp/ap_ex/t -f /tmp/ap_ex/t/conf/httpd.conf 
-DAPACHE1 -DPERL_USEITHREADS
using Apache/1.3.28

waiting for server to start: .Syntax error on line 35 of /tmp/ap_ex/t/conf/
extra.conf:
Can't locate Apache/PageKit.pm in @INC (@INC contains: /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 . /tmp/ap_ex/t/ /tmp/ap_ex/t/
lib/perl) at /tmp/ap_ex/t/conf/extra.conf line 33.
BEGIN failed--compilation aborted at /tmp/ap_ex/t/conf/extra.conf line 33.

!!!
server has died with status 255 (t/logs/error_log wasn't created, start the 
server in the debug mode)


my t/conf/extra.conf.in contains
###### t/conf/extra.conf.in ############
<Location />
SetHandler perl-script
PerlSetVar PKIT_ROOT @ServerRoot@/../eg
PerlSetVar PKIT_SERVER staging
PerlHandler +Apache::PageKit
<Perl>
# CPAN Modules required for pagekit
use Apache::URI ();
use Apache::Cookie ();
use Apache::Request ();
use Apache::SessionX ();
use Apache::Util ();
use Compress::Zlib ();
use File::Find ();
use HTML::FillInForm ();
use HTML::Parser ();
use HTML::Template ();
use XML::LibXML ();

use Apache::PageKit;
        Apache::PageKit->startup('@ServerRoot@/../eg','staging');
</Perl>
</Location>


Am Montag, 20. Oktober 2003 05:36 schrieb Stas Bekman:
> Stas Bekman wrote:
> > We discussed with Boris offline that we want to change the current
> > behavior of A::T, where it puts lib/ as the first entry in @INC. We
> > agreed to have a special maintainer mode (Env var/option) which will
> > turn on the current behavior, and by default blib/ dirs are to be first
> > in @INC.
>
> Sorry for taking that long. Please try the patch at the end of this
> message.
>
> Is everybody happy with the name of the env var APACHE_TEST_LIVE_DEV, when
> when set to 1, will prepend the project/lib directory to @INC and otherwise
> won't do anything special about it. e.g. in the new Apache::VMonitor dir:
>
>    % env t/TEST -conf
>
> produces t/conf/modperl_inc.pl:
>
> use lib '/home/stas/work/modules/Apache-VMonitor-2.0/blib/arch';
> use lib '/home/stas/work/modules/Apache-VMonitor-2.0/blib/lib';
> use Apache2;
> 1;
>
> and:
>
> % env APACHE_TEST_LIVE_DEV=1 t/TEST -conf
>
> produces t/conf/modperl_inc.pl:
>
> use lib '/home/stas/work/modules/Apache-VMonitor-2.0/blib/arch';
> use lib '/home/stas/work/modules/Apache-VMonitor-2.0/blib/lib';
> use Apache2;
> use lib '/home/stas/work/modules/Apache-VMonitor-2.0/lib';
> 1;
>
> (It was broken before anyway, since 'use Apache2' was loaded last, pushing
> 'lib' down.)
>
> Index: lib/Apache/TestConfigPerl.pm
> ===================================================================
> RCS file:
> /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.p
>m,v retrieving revision 1.77
> diff -u -r1.77 TestConfigPerl.pm
> --- lib/Apache/TestConfigPerl.pm      7 Oct 2003 17:44:58 -0000       1.77
> +++ lib/Apache/TestConfigPerl.pm      20 Oct 2003 04:29:28 -0000
> @@ -81,9 +81,8 @@
>       my $top = $self->{vars}->{top_dir};
>
>       my $inc = $self->{inc};
> -    my @trys = (catfile($top, 'lib'),
> -                catfile($top, qw(blib lib)),
> -                catfile($top, qw(blib arch)));
> +    my @trys = (catdir($top, qw(blib lib)),
> +                catdir($top, qw(blib arch)));
>
>       for (@trys) {
>           push @$inc, $_ if -d $_;
> @@ -160,6 +159,14 @@
>           }
>           my $fixup = Apache::TestConfig->modperl_2_inc_fixup();
>           print $fh $fixup;
> +
> +        # if Apache::Test is used to develop a project, we want the
> +        # project/lib directory to be first in @INC (loaded last)
> +        if ($ENV{APACHE_TEST_LIVE_DEV}) {
> +            my $dev_lib = catdir $self->{vars}->{top_dir}, "lib";
> +            print $fh "use lib '$dev_lib';\n" if -d $dev_lib;
> +        }
> +
>           print $fh "1;\n";
>       }
>
> __________________________________________________________________
> 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