This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make the new sigtrap.t test more tolerant of OS differences
[perl5.git] / lib / tainted.pl
1 warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
2
3 # This legacy library is deprecated and will be removed in a future
4 # release of perl.
5 # This subroutine returns true if its argument is tainted, false otherwise.
6 #
7
8 sub tainted {
9     local($@);
10     eval { kill 0 * $_[0] };
11     $@ =~ /^Insecure/;
12 }
13
14 1;