diff options
author | Alex Gough <alex@rcon.org> | 2001-03-08 17:18:19 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-09 01:30:13 +0000 |
commit | 3a57e0bb0403a797d32021f5aeec1a7881541f1e (patch) | |
tree | a397d9d87856868ae79e7ed8d6b4d7ff4146de12 | |
parent | aea4f609175b8d3694278560443a821f9cb5265c (diff) | |
download | perl-3a57e0bb0403a797d32021f5aeec1a7881541f1e.tar.gz |
Re: mission impossible for the day
Message-ID: <3AA7BEDB.8070409@rcon.org>
If references (are overloaded) and can be directly stringified,
show that instead of "stringified".
(The problem, infinite mutual recursion caused by overloaded bool
in Switch.pm, tracked by David Mitchell)
p4raw-id: //depot/perl@9085
-rw-r--r-- | lib/Carp/Heavy.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm index b551560e61..a3d951b08c 100644 --- a/lib/Carp/Heavy.pm +++ b/lib/Carp/Heavy.pm @@ -48,7 +48,7 @@ sub format_arg { $arg = 'undef'; } elsif (ref($arg)) { - $arg .= ''; # Make it a string; + $arg = defined($overload::VERSION) ? overload::StrVal($arg) : "$arg"; } $arg =~ s/'/\\'/g; $arg = str_len_trim($arg, $MaxLenArg); |