diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-12-14 09:41:26 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-12-14 10:56:57 -0700 |
commit | 7687d286485cd6742ddc9bd1c0f4a225d2f45725 (patch) | |
tree | df2428c2bdcdf297f6eb2867b9a4cbbd7ee64eca /pod/perlsec.pod | |
parent | 6e7325e5a2694448b7ab0583c02d4d7bb75dbac4 (diff) | |
download | perl-7687d286485cd6742ddc9bd1c0f4a225d2f45725.tar.gz |
perlsec: Fix example to localize $@.
Not doing this can cause hard-to-find bugs.
Diffstat (limited to 'pod/perlsec.pod')
-rw-r--r-- | pod/perlsec.pod | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pod/perlsec.pod b/pod/perlsec.pod index 1c49453d53..d8470ecccc 100644 --- a/pod/perlsec.pod +++ b/pod/perlsec.pod @@ -170,6 +170,7 @@ nearby CPAN mirror, and included in Perl starting from the release 5.8.0. Or you may be able to use the following C<is_tainted()> function. sub is_tainted { + local $@; # Don't pollute caller's value. return ! eval { eval("#" . substr(join("", @_), 0, 0)); 1 }; } |