lib/locale.t: Add some extra info to a debug statement
authorKarl Williamson <khw@cpan.org>
Thu, 11 Aug 2016 22:53:35 +0000 (16:53 -0600)
committerKarl Williamson <khw@cpan.org>
Wed, 17 Aug 2016 21:23:59 +0000 (15:23 -0600)
lib/locale.t

index 1f7c5ef..e8cedbc 100644 (file)
@@ -1988,12 +1988,15 @@ foreach my $Locale (@Locale) {
                 foreach my $err (keys %!) {
                     use Errno;
                     $! = eval "&Errno::$err";   # Convert to strerror() output
+                    my $errnum = 0+$!;
                     my $strerror = "$!";
                     if ("$strerror" =~ /\P{ASCII}/) {
                         $ok14 = utf8::is_utf8($strerror);
                         no locale;
                         $ok14_5 = "$!" !~ /\P{ASCII}/;
-                        debug(disp_str("non-ASCII \$!=$!")) if ! $ok14_5;
+                        debug( disp_str(
+                        "non-ASCII \$! for error $errnum='$strerror'"))
+                                                                   if ! $ok14_5;
                         last;
                     }
                 }