[perl #92446] don't use overloaded string values in the backtrace
authorTony Cook <tony@develop-help.com>
Mon, 19 Aug 2013 03:58:07 +0000 (13:58 +1000)
committerTony Cook <tony@develop-help.com>
Mon, 19 Aug 2013 04:02:05 +0000 (14:02 +1000)
commitf7c3eab38662fba5cbdbc44e67acb1fc596f9412
tree49c1022b7ca1cb2e37c6989350e272adae6bc158
parent02907c89ba2a32ef07e27384bdccc75dfa4d1aeb
[perl #92446] don't use overloaded string values in the backtrace

Allowing string overloading caused some CPAN module tests to fail.

While it seems reasonable to allow "" overloading for the backtrace, it has
several problems:

- the overloaded stringification may be suitable for end-users, but not
  for debugging, the raw reference display at least allows for identifying
  which object is involved

- the overload may not be suitable for calling in an exception, eg. it may
  call parts of Carp itself internally, or throw its own exception

- the overload may not be intended for use, eg. deprecation

This changes fixes the failures for Data-Hive and Contextual-Return
reported in [perl #119321]
dist/Carp/lib/Carp.pm
dist/Carp/t/Carp_overload.t