This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deprecate tainted.pl with a warning
[perl5.git] / lib / tainted.pl
CommitLineData
e9a927b5
S
1# This legacy library is deprecated and will be removed in a future
2# release of perl.
79072805 3# This subroutine returns true if its argument is tainted, false otherwise.
e9a927b5
S
4#
5warn( "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." );
79072805
LW
8
9sub tainted {
10 local($@);
11 eval { kill 0 * $_[0] };
12 $@ =~ /^Insecure/;
13}
14
151;