summaryrefslogtreecommitdiff
path: root/lib/Test
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-29 23:35:50 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-29 23:35:50 +0000
commit1250aba519c4f388317ce9822edbe8ca724e1616 (patch)
tree50d370d14892261902c9de0f46db154cb1ffa987 /lib/Test
parent57e73c4b0ab7f637f07667e3f6fda277d0671dc3 (diff)
downloadperl-1250aba519c4f388317ce9822edbe8ca724e1616.tar.gz
VMS fixups (from Dan Sugalski); cosmetic tweaks
p4raw-id: //depot/perl@5378
Diffstat (limited to 'lib/Test')
-rw-r--r--lib/Test/Harness.pm15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm
index 61a29dbaaa..820c661205 100644
--- a/lib/Test/Harness.pm
+++ b/lib/Test/Harness.pm
@@ -64,9 +64,20 @@ 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
+ my $new5lib;
+ if ($^O eq 'VMS') {
+ $new5lib = join($Config{path_sep}, grep {!/perl_root/i;} @INC);
+ $switches =~ s/-(\S*[A-Z]\S*)/"-$1"/g;
+ }
+ else {
+ $new5lib = join($Config{path_sep}, @INC);
+ }
+
+ local($ENV{'PERL5LIB'}) = $new5lib;
my @dir_files = globdir $files_in_dir if defined $files_in_dir;
my $t_start = new Benchmark;