diff options
author | Abigail <abigail@abigail.be> | 2001-08-12 01:49:49 +0200 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-12 13:56:42 +0000 |
commit | 9e1b5a4e54e5c46a7023c503b5749aa9998420a2 (patch) | |
tree | 929c0fed05213d315565fee38ae9623a973cf348 /t/op/taint.t | |
parent | ff76feabe05d384b669cf347124af347cb9ad879 (diff) | |
download | perl-9e1b5a4e54e5c46a7023c503b5749aa9998420a2.tar.gz |
Re: [ID 20010730.010] FETCH called twice with -T
Message-ID: <20010811214950.23255.qmail@foad.org>
p4raw-id: //depot/perl@11642
Diffstat (limited to 't/op/taint.t')
-rwxr-xr-x | t/op/taint.t | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/t/op/taint.t b/t/op/taint.t index effb12c3b0..592bb2aae5 100755 --- a/t/op/taint.t +++ b/t/op/taint.t @@ -109,7 +109,7 @@ print PROG 'print "@ARGV\n"', "\n"; close PROG; my $echo = "$Invoke_Perl $ECHO"; -print "1..174\n"; +print "1..175\n"; # First, let's make sure that Perl is checking the dangerous # environment variables. Maybe they aren't set yet, so we'll @@ -839,3 +839,36 @@ else { print "ok 174\n"; } + +{ + # Bug ID 20010730.010 + + my $i = 0; + + sub Tie::TIESCALAR { + my $class = shift; + my $arg = shift; + + bless \$arg => $class; + } + + sub Tie::FETCH { + $i ++; + ${$_ [0]} + } + + + package main; + + my $bar = "The Big Bright Green Pleasure Machine"; + taint_these $bar; + tie my ($foo), Tie => $bar; + + my $baz = $foo; + + print $i == 1 ? "ok 175\n" : "not ok 175\n" + +} + + + |