This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8_heavy.pl: Improve debug output
authorKarl Williamson <public@khwilliamson.com>
Sun, 6 Feb 2011 17:10:47 +0000 (10:10 -0700)
committerKarl Williamson <public@khwilliamson.com>
Sun, 6 Feb 2011 17:13:26 +0000 (10:13 -0700)
Often, when DEBUG is set, an uninitialized variable message gets printed
as well.  This fixes that.

lib/utf8_heavy.pl

index 6bf8975..4825b0f 100644 (file)
@@ -32,7 +32,9 @@ sub croak { require Carp; Carp::croak(@_) }
         local $^D = 0 if $^D;
 
         $class = "" unless defined $class;
-        print STDERR __LINE__, ": class=$class, type=$type, list=$list, minbits=$minbits, none=$none\n" if DEBUG;
+        print STDERR __LINE__, ": class=$class, type=$type, list=",
+                                (defined $list) ? $list : ':undef:',
+                                ", minbits=$minbits, none=$none\n" if DEBUG;
 
         ##
         ## Get the list of codepoints for the type.