diff options
author | Yitzchak Scott-Thoennes <sthoenna@efn.org> | 2005-11-27 17:26:31 -0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-08-09 15:46:55 +0000 |
commit | ced497e2fca8b0ac1628855f422776e9bf331e65 (patch) | |
tree | 8c9862d08cb942d5ab79b75cdd14bfab9ecdeb87 /t | |
parent | e6f8b432a6859b2fcff710fa0ce40a8c0f93bf2b (diff) | |
download | perl-ced497e2fca8b0ac1628855f422776e9bf331e65.tar.gz |
Re: [perl #37731] junk and uninit'ed values in tied scalars
Message-ID: <20051128092605.GA2328@efn.org>
plus a regression test
p4raw-id: //depot/perl@28684
Diffstat (limited to 't')
-rwxr-xr-x | t/op/tie.t | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/op/tie.t b/t/op/tie.t index 1d676eaa1c..a8d79fbc93 100755 --- a/t/op/tie.t +++ b/t/op/tie.t @@ -612,3 +612,13 @@ print scalar keys %h, "\n"; EXPECT 0 0 +######## +# Bug 37731 +sub foo::TIESCALAR { bless {value => $_[1]}, $_[0] } +sub foo::FETCH { $_[0]->{value} } +tie my $VAR, 'foo', '42'; +foreach my $var ($VAR) { + print +($var eq $VAR) ? "yes\n" : "no\n"; +} +EXPECT +yes |