Stas Bekman wrote:
Randy Kobes wrote:
On Wed, 14 Jul 2004, Randy Kobes wrote:
For making the tests for apr/apr-ext share a common
base under modperl-2.0/t/lib/TestAPRlib/, one must
at present 'use lib q(.....)' in the appropriate
places for both the t/apr/ and t/apr-ext/ tests.
Would the following patch be OK to add this to
httpd.conf, so one doesn't have to repeat it?
I forgot one piece - that to add the t/lib to t/TEST,
so that one doesn't have to add it within the t/apr-ext/
tests. Here's a version including that:
===================================================
Index: lib/Apache/TestConfig.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
retrieving revision 1.227
diff -u -r1.227 TestConfig.pm
--- lib/Apache/TestConfig.pm 5 Jul 2004 15:58:00 -0000 1.227
+++ lib/Apache/TestConfig.pm 14 Jul 2004 22:08:10 -0000
@@ -873,11 +873,13 @@
}
}
- for (qw(. ..)) {
- my $dir = canonpath catdir $FindBin::Bin, $_ , "Apache-Test",
"lib";
- if (-d $dir) {
- push @dirs, $dir;
- last;
+ for my $d (qw/Apache-Test t/) {
+ for (qw(. ..)) {
+ my $dir = canonpath catdir $FindBin::Bin, $_ , $d, "lib";
+ if (-d $dir) {
+ push @dirs, $dir;
+ last;
+ }
}
}
we now always chdir to t/.. before we start. So the '..' part is
probably redundant and if there is no t/lib, we will have the same
directory Apache-Test/../lib and t/../lib included twice in @INC.
or just leave the existing code as it is and just add:
{
my $dir = canonpath catdir $FindBin::Bin, "t", "lib";
push @dirs, $dir if -d $dir;
}
--
__________________________________________________________________
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]