httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm
Date Wed, 21 May 2003 04:26:53 GMT
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
   }
  
  
  

Mime
View raw message