From: John E. Malmberg Date: Sun, 11 Nov 2007 17:42:46 +0000 (-0600) Subject: patch@32274 file/find/t/ find.t and taint.t fixes for VMS. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=234fd682f8f9bd4358b24b5052732af3a76654c2;p=p5sagit%2Fp5-mst-13.2.git patch@32274 file/find/t/ find.t and taint.t fixes for VMS. From: "John E. Malmberg" Message-id: <47379376.6070809@qsl.net> With variations to make it cross-platform. p4raw-id: //depot/perl@32279 --- diff --git a/lib/File/Find/t/find.t b/lib/File/Find/t/find.t index 33e5264..60834bd 100644 --- a/lib/File/Find/t/find.t +++ b/lib/File/Find/t/find.t @@ -10,8 +10,10 @@ my ($warn_msg, @files, $file); BEGIN { + require File::Spec; chdir 't' if -d 't'; - unshift @INC => '../lib'; + # May be doing dynamic loading while @INC is all relative + unshift @INC => File::Spec->rel2abs('../lib'); $SIG{'__WARN__'} = sub { $warn_msg = $_[0]; warn "# $_[0]"; } } diff --git a/lib/File/Find/t/taint.t b/lib/File/Find/t/taint.t index 1d6fb00..2059765 100644 --- a/lib/File/Find/t/taint.t +++ b/lib/File/Find/t/taint.t @@ -8,8 +8,12 @@ my ($cwd, $cwd_untainted); BEGIN { + require File::Spec; chdir 't' if -d 't'; - unshift @INC => '../lib'; + # May be doing dynamic loading while @INC is all relative + my $lib = File::Spec->rel2abs('../lib'); + $lib = $1 if $lib =~ m/(.*)/; + unshift @INC => $lib; } use Config;