From: Charles Bailey Date: Thu, 2 Mar 2000 03:59:14 +0000 (+0000) Subject: Remove redundant elements of @INC to cope with VMS' 255-char limit X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fca4e211d32ea32ffb56468bae3793f4bf75b13b;p=p5sagit%2Fp5-mst-13.2.git Remove redundant elements of @INC to cope with VMS' 255-char limit on PERL5LIB logical (Dan Sugalski) p4raw-id: //depot/vmsperl@5423 --- diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm index 61a29db..0bcdb8d 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;