summaryrefslogtreecommitdiff
path: root/lib/Tie
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-05-13 10:36:18 +0000
committerNicholas Clark <nick@ccl4.org>2006-05-13 10:36:18 +0000
commita327f6f76d778aa12eddd09664ddf61c15a188e0 (patch)
tree767e4921a49826f718b1a9d6c5b2d113ba84084e /lib/Tie
parentd9fad198da41e1cd37600ae397146e27a413303d (diff)
downloadperl-a327f6f76d778aa12eddd09664ddf61c15a188e0.tar.gz
Can't do require Foo if $tainted; because taint tunnels.
(Documented, but I regard this as a serious practical deficiency in tainting) p4raw-id: //depot/perl@28185
Diffstat (limited to 'lib/Tie')
-rw-r--r--lib/Tie/RefHash.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Tie/RefHash.pm b/lib/Tie/RefHash.pm
index 30a90d98af..2f0962819a 100644
--- a/lib/Tie/RefHash.pm
+++ b/lib/Tie/RefHash.pm
@@ -2,7 +2,7 @@ package Tie::RefHash;
use vars qw/$VERSION/;
-$VERSION = "1.34";
+$VERSION = "1.34_01";
=head1 NAME
@@ -96,7 +96,12 @@ BEGIN {
use Config ();
my $usethreads = $Config::Config{usethreads}; # && exists $INC{"threads.pm"}
*_HAS_THREADS = $usethreads ? sub () { 1 } : sub () { 0 };
- require Scalar::Util if $usethreads; # we need weaken()
+ if ($usethreads) {
+ # The magic of taint tunneling means that we can't do this require in the
+ # same statement as the boolean check on $usethreads, as $usethreads is
+ # tainted.
+ require Scalar::Util;
+ }
}
BEGIN {