This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
better check for overload::StrVal
authorZefram <zefram@fysh.org>
Sun, 18 Aug 2013 13:24:30 +0000 (14:24 +0100)
committerZefram <zefram@fysh.org>
Sun, 18 Aug 2013 13:24:30 +0000 (14:24 +0100)
The overloading logic in Carp got confused on perl 5.6 by the overload
module not setting $VERSION.  As the overload-is-loaded check controls
the use of overload::StrVal(), check for that sub being defined rather
than checking $VERSION.

dist/Carp/lib/Carp.pm

index 5601c23..4365808 100644 (file)
@@ -213,7 +213,7 @@ sub format_arg {
         {
             1;
         }
-        elsif (defined($overload::VERSION))
+        elsif (defined(&overload::StrVal))
         {
            if ($in_recurse ||
                !do {