* Synced the perlfaq
[p5sagit/p5-mst-13.2.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;