This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #82854] utf8, $SIG{__DIE__}, syntax errors and Carp
[perl5.git] / lib / Carp.pm
index be4cb69..77fc2a1 100644 (file)
@@ -146,9 +146,9 @@ sub format_arg {
         $arg = str_len_trim( $arg, $MaxArgLen );
 
         # Quote it?
-        $arg = "'$arg'" unless $arg =~ /^-?[\d.]+\z/;
-    }
-    else {
+        $arg = "'$arg'" unless $arg =~ /^-?[0-9.]+\z/;
+    }                                    # 0-9, not \d, as \d will try to
+    else {                               # load Unicode tables
         $arg = 'undef';
     }