diff options
author | Charles Bailey <bailey@newman.upenn.edu> | 2000-03-02 03:59:14 +0000 |
---|---|---|
committer | bailey <bailey@newman.upenn.edu> | 2000-03-02 03:59:14 +0000 |
commit | fca4e211d32ea32ffb56468bae3793f4bf75b13b (patch) | |
tree | 17894bac019968cf3ba9031966ee56e508ba4172 | |
parent | 1fff69f13487ea7558f26e1865fa81bbc4fcd820 (diff) | |
download | perl-fca4e211d32ea32ffb56468bae3793f4bf75b13b.tar.gz |
Remove redundant elements of @INC to cope with VMS' 255-char limit
on PERL5LIB logical (Dan Sugalski)
p4raw-id: //depot/vmsperl@5423
-rw-r--r-- | lib/Test/Harness.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm index 61a29dbaaa..0bcdb8d321 100644 --- a/lib/Test/Harness.pm +++ b/lib/Test/Harness.pm @@ -64,9 +64,14 @@ sub runtests { # pass -I flags to children my $old5lib = $ENV{PERL5LIB}; - local($ENV{'PERL5LIB'}) = join($Config{path_sep}, @INC); - if ($^O eq 'VMS') { $switches =~ s/-(\S*[A-Z]\S*)/"-$1"/g } + # VMS has a 255-byte limit on the length of %ENV entries, so + # toss the ones that involve perl_root, the install location + # for VMS + local($ENV{'PERL5LIB'}) = join($Config{path_sep}, grep {!/perl_root/i;} @INC) if $^O eq 'VMS'; + local($ENV{'PERL5LIB'}) = join($Config{path_sep}, @INC) unless $^O eq 'VMS'; + + if ($^O eq 'VMS') { $switches =~ s/-(\S*[A-Z]\S*)/"-$1"/g;} my @dir_files = globdir $files_in_dir if defined $files_in_dir; my $t_start = new Benchmark; |