summaryrefslogtreecommitdiff
path: root/lib/overload.t
diff options
context:
space:
mode:
authorRick Delaney <rick@consumercontact.com>2004-11-03 14:46:16 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-11-04 08:25:34 +0000
commit1b1d102f0a25a469525d1d8639733ed50d8b39b6 (patch)
tree31da716cdc701faa2af71b652ecdbb7e209cd086 /lib/overload.t
parent76c43448ac432c021de5e478d6210fa84dcac466 (diff)
downloadperl-1b1d102f0a25a469525d1d8639733ed50d8b39b6.tar.gz
Re: [PATCH perl-current] Re: [perl #31793] Data::Dumper: Useqq interacts badly with overloading
Message-ID: <20041104004616.GA11214@biff.bort.ca> p4raw-id: //depot/perl@23470
Diffstat (limited to 'lib/overload.t')
-rw-r--r--lib/overload.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/overload.t b/lib/overload.t
index 173a177088..a30a53b1eb 100644
--- a/lib/overload.t
+++ b/lib/overload.t
@@ -1139,9 +1139,12 @@ test ($@ =~ /zap/);
{
package perl31793;
+ use overload cmp => sub { 0 };
+ package perl31793_fb;
use overload cmp => sub { 0 }, fallback => 1;
package main;
my $o = bless [], 'perl31793';
+ my $of = bless [], 'perl31793_fb';
my $no = bless [], 'no_overload';
test (overload::StrVal(\"scalar") =~ /^SCALAR\(0x[0-9a-f]+\)$/);
test (overload::StrVal([]) =~ /^ARRAY\(0x[0-9a-f]+\)$/);
@@ -1151,6 +1154,7 @@ test ($@ =~ /zap/);
test (overload::StrVal(\$o) =~ /^REF\(0x[0-9a-f]+\)$/);
test (overload::StrVal(qr/a/) =~ /^Regexp=SCALAR\(0x[0-9a-f]+\)$/);
test (overload::StrVal($o) =~ /^perl31793=ARRAY\(0x[0-9a-f]+\)$/);
+ test (overload::StrVal($of) =~ /^perl31793_fb=ARRAY\(0x[0-9a-f]+\)$/);
test (overload::StrVal($no) =~ /^no_overload=ARRAY\(0x[0-9a-f]+\)$/);
}
@@ -1199,4 +1203,4 @@ foreach my $op (qw(<=> == != < <= > >=)) {
# Last test is:
-sub last {496}
+sub last {497}