diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-09 13:37:01 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-09 13:37:01 +0000 |
commit | 213329dd3d3cdcddf6cc727a9d45053e2788898b (patch) | |
tree | a0462206b0af3340974a4bfef4d1e1149d120e85 /pod/perlfaq7.pod | |
parent | 7dc9aaa56b11c3e04f31eb9de23451166e23126f (diff) | |
download | perl-213329dd3d3cdcddf6cc727a9d45053e2788898b.tar.gz |
FAQ sync.
p4raw-id: //depot/perl@12911
Diffstat (limited to 'pod/perlfaq7.pod')
-rw-r--r-- | pod/perlfaq7.pod | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/pod/perlfaq7.pod b/pod/perlfaq7.pod index cabfca134b..e0b2e8e0fb 100644 --- a/pod/perlfaq7.pod +++ b/pod/perlfaq7.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq7 - Perl Language Issues ($Revision: 1.3 $, $Date: 2001/10/19 14:39:24 $) +perlfaq7 - Perl Language Issues ($Revision: 1.4 $, $Date: 2001/11/07 02:27:50 $) =head1 DESCRIPTION @@ -183,17 +183,9 @@ L<perlobj> and L<perlbot>. =head2 How can I tell if a variable is tainted? -See L<perlsec/"Laundering and Detecting Tainted Data">. Here's an -example (which doesn't use any system calls, because the kill() -is given no processes to signal): - - sub is_tainted { - return ! eval { join('',@_), kill 0; 1; }; - } - -This is not C<-w> clean, however. There is no C<-w> clean way to -detect taintedness--take this as a hint that you should untaint -all possibly-tainted data. +You can use the tainted() function of the Scalar::Util module, available +from CPAN (or included with Perl since release 5.8.0). +See also L<perlsec/"Laundering and Detecting Tainted Data">. =head2 What's a closure? |