summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorYitzchak Scott-Thoennes <sthoenna@efn.org>2005-11-27 17:26:31 -0800
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-08-09 15:46:55 +0000
commitced497e2fca8b0ac1628855f422776e9bf331e65 (patch)
tree8c9862d08cb942d5ab79b75cdd14bfab9ecdeb87 /t
parente6f8b432a6859b2fcff710fa0ce40a8c0f93bf2b (diff)
downloadperl-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-xt/op/tie.t10
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