From: Rafael Garcia-Suarez Date: Wed, 3 Nov 2004 11:54:28 +0000 (+0000) Subject: Mostly revert change #23347 (keep the test suite, fixed), X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=76c43448ac432c021de5e478d6210fa84dcac466;p=p5sagit%2Fp5-mst-13.2.git Mostly revert change #23347 (keep the test suite, fixed), having decided that it wasn't a correct fix for bug #31793. p4raw-link: @23347 on //depot/perl: d411a6a9eb5df09116806ed1c441d30d37e8d5e8 p4raw-id: //depot/perl@23469 --- diff --git a/lib/overload.pm b/lib/overload.pm index 8c0b899..237856f 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -94,7 +94,7 @@ sub AddrRef { } sub StrVal { - (ref $_[0] && Overloaded($_[0]) or ref($_[0]) eq 'Regexp') ? + (ref $_[0] && OverloadedStringify($_[0]) or ref($_[0]) eq 'Regexp') ? (AddrRef(shift)) : "$_[0]"; } diff --git a/lib/overload.t b/lib/overload.t index 7d076c2..173a177 100644 --- a/lib/overload.t +++ b/lib/overload.t @@ -1139,7 +1139,7 @@ test ($@ =~ /zap/); { package perl31793; - use overload cmp => sub { 0 }; + use overload cmp => sub { 0 }, fallback => 1; package main; my $o = bless [], 'perl31793'; my $no = bless [], 'no_overload';