7 and $Config{'extensions'} !~ /\bIO\b/ && $^O ne 'VMS'
8 or not ${^TAINT}) # not ${^TAINT} => perl without taint support
16 if ($ENV{PERL_CORE}) {
17 require("../../t/test.pl");
20 require("./t/test.pl");
24 END { unlink "./__taint__$$" }
27 my $x = new IO::File "> ./__taint__$$" || die("Cannot open ./__taint__$$\n");
31 $x = new IO::File "< ./__taint__$$" || die("Cannot open ./__taint__$$\n");
32 chop(my $unsafe = <$x>);
33 eval { kill 0 * $unsafe };
35 skip($^O) if $^O eq 'MSWin32' or $^O eq 'NetWare';
36 like($@, '^Insecure');
40 # We could have just done a seek on $x, but technically we haven't tested
42 $x = new IO::File "< ./__taint__$$" || die("Cannot open ./__taint__$$\n");
44 ok(!$?); # Calling the method worked
46 eval { kill 0 * $unsafe };
47 unlike($@,'^Insecure');
51 todo_skip("Known bug in 5.10.0",2) if $] >= 5.010 and $] < 5.010_001;
53 # this will segfault if it fails
56 { my $dummy = index 'foo', PVBM }
58 eval { IO::Handle::untaint(PVBM) };
61 eval { IO::Handle::untaint(\PVBM) };