From: Abigail Date: Sat, 11 Aug 2001 23:49:49 +0000 (+0200) Subject: Re: [ID 20010730.010] FETCH called twice with -T X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9e1b5a4e54e5c46a7023c503b5749aa9998420a2;p=p5sagit%2Fp5-mst-13.2.git Re: [ID 20010730.010] FETCH called twice with -T Message-ID: <20010811214950.23255.qmail@foad.org> p4raw-id: //depot/perl@11642 --- diff --git a/t/op/taint.t b/t/op/taint.t index effb12c..592bb2a 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" + +} + + +