On Thu, 6 Dec 2001, Stas Bekman wrote: > Doug MacEachern wrote: > > > On Wed, 5 Dec 2001, Stas Bekman wrote: > > > > > >>can we make the t/TEST use Apache-Test/lib rather than blib? I've run > >>'cvs up' but forgot to run 'make' to copy the updates to blib :( > >> > > > > i thought it already did: > > t/TEST on the client does: > > use lib map { "$_/Apache-Test/lib" } qw(. ..); > > > > and t/conf/modperl_inc.pl on the server side does: > > use lib '/home/dougm/ap/modperl-2.0/Apache-Test/lib'; > > use lib '/home/dougm/ap/modperl-2.0/lib'; > > use lib '/home/dougm/ap/modperl-2.0/blib/lib'; > > use lib '/home/dougm/ap/modperl-2.0/blib/arch'; > > ... > > > right, that's the client side. Look at @INC printed just before the > server is started in TestServer: > > /home/stas/apache.org/mp-file/lib > /home/stas/apache.org/mp-file/blib/lib > /home/stas/apache.org/mp-file/blib/arch > ./Apache-Test/lib > ../Apache-Test/lib > /home/stas/perl/ithread/lib/5.7.2/i686-linux-thread-multi > /home/stas/perl/ithread/lib/5.7.2 > /home/stas/perl/ithread/lib/site_perl/5.7.2/i686-linux-thread-multi > /home/stas/perl/ithread/lib/site_perl/5.7.2 > /home/stas/perl/ithread/lib/site_perl > . at Apache-Test/lib/Apache/TestServer.pm line 389. > > which is not what we want.
this patch puts things into the desired order: ./Apache-Test/lib ../Apache-Test/lib /home/stas/apache.org/mp-file/lib /home/stas/apache.org/mp-file/blib/lib /home/stas/apache.org/mp-file/blib/arch /home/stas/perl/ithread/lib/5.7.2/i686-linux-thread-multi /home/stas/perl/ithread/lib/5.7.2 /home/stas/perl/ithread/lib/site_perl/5.7.2/i686-linux-thread-multi /home/stas/perl/ithread/lib/site_perl/5.7.2 /home/stas/perl/ithread/lib/site_perl . Index: Apache-Test/lib/Apache/TestConfig.pm =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v retrieving revision 1.90 diff -u -r1.90 TestConfig.pm --- Apache-Test/lib/Apache/TestConfig.pm 2001/12/04 03:56:35 1.90 +++ Apache-Test/lib/Apache/TestConfig.pm 2001/12/06 06:33:42 @@ -1109,9 +1109,14 @@ sub add_inc { my $self = shift; require lib; + # make sure that the ./Apache::Test dev libs will be first, followed + # by modperl ./lib, followed by ./blib and finally core Perl libs. + my @libs = map { "$_/Apache-Test/lib" } qw(. ..); + lib::->unimport(@libs); lib::->import(map "$self->{vars}->{top_dir}/$_", qw(lib blib/lib blib/arch)); - #print join "\n", @INC, ""; + lib::->import(@libs); + #print join "\n", "add_inc", @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://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]