Salvage bits and pieces from the experimental 'utf8 everywhere'
[p5sagit/p5-mst-13.2.git] / lib / Carp / Heavy.pm
index dac9c75..a3d951b 100644 (file)
@@ -1,6 +1,12 @@
 # Carp::Heavy uses some variables in common with Carp.
 package Carp;
 
+=head1 NAME
+
+Carp heavy machinery - no user serviceable parts inside
+
+=cut
+
 # use strict; # not yet
 
 # On one line so MakeMaker will see it.
@@ -42,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);