else
#endif
sv_setpv(sv, errno ? Strerror(errno) : "");
+ SvPOK_on(sv); /* may have got removed during taint processing */
RESTORE_ERRNO;
}
#endif
use File::Spec::Functions;
BEGIN { require './test.pl'; }
-plan tests => 301;
+plan tests => 302;
$| = 1;
ok(tainted($zz), "pack a*a* preserves tainting");
}
+# Bug RT #61976 tainted $! would show numeric rather than string value
+
+{
+ my $tainted_path = substr($^X,0,0) . "/no/such/file";
+ my $err;
+ # $! is used in a tainted expression, so gets tainted
+ open my $fh, $tainted_path or $err= "$!";
+ unlike($err, qr/^\d+$/, 'tainted $!');
+}
+
+
# This may bomb out with the alarm signal so keep it last
SKIP: {
skip "No alarm()" unless $Config{d_alarm};