summaryrefslogtreecommitdiff
path: root/t/pragma
diff options
context:
space:
mode:
authorDaniel Chetlin <daniel@chetlin.com>2000-09-17 22:05:40 -0700
committerNick Ing-Simmons <nik@tiuk.ti.com>2000-09-30 13:04:30 +0000
commit1554e226caad86d8d9b68656b257a3e2cc55803c (patch)
tree47c30405efe1d83b5fbaf20a28b649a0ccb9f503 /t/pragma
parente788edffda7d09f6c23d57801a774fbdc00e5bac (diff)
downloadperl-1554e226caad86d8d9b68656b257a3e2cc55803c.tar.gz
Fix some recursion in overload.pm
Message-Id: <20000918050540.C652@ilmd> p4raw-id: //depot/perl@7104
Diffstat (limited to 't/pragma')
-rwxr-xr-xt/pragma/overload.t16
1 files changed, 15 insertions, 1 deletions
diff --git a/t/pragma/overload.t b/t/pragma/overload.t
index c142a64c0c..c57eb1132c 100755
--- a/t/pragma/overload.t
+++ b/t/pragma/overload.t
@@ -969,5 +969,19 @@ unless ($aaa) {
test($a =~ /^`1' is not a code reference at/); # 215
}
+# make sure that we don't inifinitely recurse
+{
+ my $c = 0;
+ package Recurse;
+ use overload '""' => sub { shift },
+ '0+' => sub { shift },
+ 'bool' => sub { shift },
+ fallback => 1;
+ my $x = bless([]);
+ main::test("$x" =~ /Recurse=ARRAY/); # 216
+ main::test($x); # 217
+ main::test($x+0 =~ /Recurse=ARRAY/); # 218
+};
+
# Last test is:
-sub last {215}
+sub last {218}