bump version to 1.008021
[p5sagit/local-lib.git] / t / taint-mode.t
index 94392cf..ae73f7f 100644 (file)
@@ -22,14 +22,20 @@ 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 <<EOM;
 #!/usr/bin/perl -T
 use strict; use warnings;
 use local::lib '$dir1';
-my \$dir1 = "$dir1";
-if (grep { \$_ =~ m{^\$dir1/} } \@INC) {
+warn "using lib dir $dir1\\n";
+my \$quoted_dir = quotemeta('$dir1');
+warn "dir is $dir1, quoted is \$quoted_dir\\n";
+if (grep { m{^\$quoted_dir/} } \@INC) {
   exit 0;
 }
+warn '\@INC is: ', join("\\n", \@INC), "\\n";
 exit 1
 EOM
 close $fh;