This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[PATCH] extra tests for t/op/tie.t (was RE: [perl #53482] I believe I found a bug...
authorBram <p5p@perl.wizbit.be>
Sun, 1 Nov 2009 00:17:57 +0000 (19:17 -0500)
committerSteve Peters <steve@fisharerojo.org>
Sun, 1 Nov 2009 00:17:57 +0000 (19:17 -0500)
t/op/tie.t

index 8298ed2..8daa8b0 100644 (file)
@@ -588,13 +588,19 @@ print $h.$h;
 EXPECT
 01
 ########
+# Bug 53482 (and maybe others)
 sub TIESCALAR { my $foo = $_[1]; bless \$foo, $_[0] }
 sub FETCH { ${$_[0]} }
-tie my $x, "main", 2;
-tie my $y, "main", 8;
-print $x | $y;
-EXPECT
-10
+tie my $x1, "main", 2;
+tie my $y1, "main", 8;
+print $x1 | $y1;
+print $x1 | $y1;
+tie my $x2, "main", "2";
+tie my $y2, "main", "8";
+print $x2 | $y2;
+print $x2 | $y2;
+EXPECT
+1010::
 ########
 # Bug 36267
 sub TIEHASH  { bless {}, $_[0] }