This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
untodo the no-longer-failing todo test for rgs' patch
[perl5.git] / lib / tainted.pl
1 # This legacy library is deprecated and will be removed in a future
2 # release of perl.
3 # This subroutine returns true if its argument is tainted, false otherwise.
4 #
5 warn( "The 'tainted.pl' legacy library is deprecated and will be"
6       . " removed in the next major release of perl. Please use the"
7       . " Scalar::Util module ('tainted' function) instead." );
8
9 sub tainted {
10     local($@);
11     eval { kill 0 * $_[0] };
12     $@ =~ /^Insecure/;
13 }
14
15 1;