From: Graham Knop Date: Tue, 22 Oct 2013 12:25:27 +0000 (-0400) Subject: more reliable escaping in taint test X-Git-Tag: 1.008024~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2dcb6c853bdf459c11096ea7c6f6c8e0594f98a8;p=p5sagit%2Flocal-lib.git more reliable escaping in taint test --- diff --git a/t/taint-mode.t b/t/taint-mode.t index 43c01be..50735bf 100644 --- a/t/taint-mode.t +++ b/t/taint-mode.t @@ -22,16 +22,14 @@ local::lib->import($dir1); # local lib to the same temp dir. my ($fh, $filename) = tempfile('test_local_lib-XXXXX', DIR => Cwd::abs_path('t'), UNLINK => 1); -# escape backlslashes for embedding into generated script -$dir1 =~ s/\\/\\\\/g; - print $fh <import(\$dir); +warn "using lib dir \$dir\\n"; +if (grep { m{^\\Q\$dir} } \@INC) { exit 0; } warn '\@INC is: ', join("\\n", \@INC), "\\n";