lib/locale.t: Only output debug message if relevant
authorKarl Williamson <public@khwilliamson.com>
Tue, 3 Dec 2013 02:28:52 +0000 (19:28 -0700)
committerKarl Williamson <public@khwilliamson.com>
Thu, 5 Dec 2013 02:52:38 +0000 (19:52 -0700)
This message telling people to set an environment variable was output
even if the variable was already set; this is potentially confusing

lib/locale.t

index f211aef8a68ca96fe60ec1c7c1f250f142993b09..b15d297b20fe502b72cb1340c4baf81c1bb69f23 100644 (file)
@@ -2250,11 +2250,19 @@ if ($didwarn) {
         my $F = join(" ", @F);
         $F =~ s/(.{50,60}) /$1\n#\t/g;
 
+        my $details = "";
+        unless ($debug) {
+            $details = "# For more details, rerun, with environment variable PERL_DEBUG_FULL_TEST=1.\n";
+        }
+        elsif ($debug == 1) {
+            $details = "# For even more details, rerun, with environment variable PERL_DEBUG_FULL_TEST=2.\n";
+        }
+
         warn
           "# The following locales\n#\n",
           "#\t", $F, "\n#\n",
           "# had problems.\n#\n",
-          "# For more details, rerun, with environment variable PERL_DEBUG_FULL_TEST=1.\n";
+          $details;
     } else {
         warn "# None of your locales were broken.\n";
     }