[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-test-cvs
Subject: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm
From: stas () apache ! org
Date: 2003-05-21 4:26:53
[Download RAW message or body]
stas 2003/05/20 21:26:52
Modified: perl-framework/Apache-Test/lib/Apache TestConfig.pm
Log:
- fix the bug in the previous commit, (lost /lib in Apache-Test/lib)
- expand the relative paths when creating the script, to make it simpler
to debug @INC issues
Revision Changes Path
1.163 +13 -6 httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm
Index: TestConfig.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -r1.162 -r1.163
--- TestConfig.pm 20 May 2003 06:01:38 -0000 1.162
+++ TestConfig.pm 21 May 2003 04:26:52 -0000 1.163
@@ -22,7 +22,7 @@
use File::Find qw(finddepth);
use File::Basename qw(dirname);
use File::Path ();
-use File::Spec::Functions qw(catfile abs2rel splitdir
+use File::Spec::Functions qw(catfile abs2rel splitdir canonpath
catdir file_name_is_absolute);
use Cwd qw(fastcwd);
@@ -773,23 +773,30 @@
require FindBin;
# the live 'lib/' dir of the distro (e.g. modperl-2.0/ModPerl-Registry/lib)
- my @dirs = qw(lib);
+ my @dirs = canonpath catdir $FindBin::Bin, "lib";
# the live dir of the top dir if any (e.g. modperl-2.0/lib)
if (-e catfile($FindBin::Bin, "..", "Makefile.PL") &&
-d catdir($FindBin::Bin, "..", "lib") ) {
- push @dirs, '../lib';
+ push @dirs, canonpath catdir $FindBin::Bin, "..", "lib";
}
- push @dirs, 'Apache-Test' if IS_MOD_PERL_2_BUILD;
+ for (qw(. ..)) {
+ my $dir = canonpath catdir $FindBin::Bin, $_ , "Apache-Test", "lib";
+ if (-d $dir) {
+ push @dirs, $dir;
+ last;
+ }
+ }
+
+ my $dirs = join("\n ", '', @dirs) . "\n";;
return <<"EOF";
use strict;
use warnings FATAL => 'all';
-use FindBin;
-use lib map "\$FindBin::Bin/../\$_", qw(@dirs);
+use lib qw($dirs);
EOF
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic