summaryrefslogtreecommitdiff
path: root/lib/Test
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-07-03 06:35:29 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-07-03 06:35:29 +0000
commit5877e5bee20537e78e0922570e32f4390ac0f90c (patch)
tree756a4c5930b3dd692f366e14a4c259330b43d5ae /lib/Test
parent2d5ccbbaf6e451d3cdfd3aaf9891805bd0206665 (diff)
downloadperl-5877e5bee20537e78e0922570e32f4390ac0f90c.tar.gz
Apply Schwern's suggested warning code from
[perl #22209] Test::Harness::Straps vs. $Config{path_sep} p4raw-id: //depot/perl@19947
Diffstat (limited to 'lib/Test')
-rw-r--r--lib/Test/Harness/Straps.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Test/Harness/Straps.pm b/lib/Test/Harness/Straps.pm
index dc3e4b644a..058070b991 100644
--- a/lib/Test/Harness/Straps.pm
+++ b/lib/Test/Harness/Straps.pm
@@ -358,7 +358,13 @@ sub _INC2PERL5LIB {
$self->{_old5lib} = $ENV{PERL5LIB};
- return join $Config{path_sep}, $self->_filtered_INC;
+ my @filtered_inc = $self->_filtered_INC;
+ my @clean_inc = grep !/\Q$Config{path_sep}/, @filtered_inc;
+ my @naughty_inc = grep /\Q$Config{path_sep}/, @filtered_inc;
+ warn "Test::Harness can't handle \@INC directories with ".
+ "'$Config{path_sep}': @naughty_inc\n" if @naughty_inc;
+
+ return join $Config{path_sep}, @clean_inc;
}
=item B<_filtered_INC>