Fix breakages that prevended -DPERL_POISON from compiling.
[p5sagit/p5-mst-13.2.git] / lib / charnames.t
index 3502b74..c53f54a 100644 (file)
@@ -15,7 +15,7 @@ require File::Spec;
 
 $| = 1;
 
-print "1..73\n";
+print "1..74\n";
 
 use charnames ':full';
 
@@ -61,7 +61,7 @@ else { # EBCDIC where UTF-EBCDIC may be used (this may be 1047 specific since
 }
 
 sub to_bytes {
-    pack"a*", shift;
+    unpack"U0a*", shift;
 }
 
 {
@@ -328,6 +328,12 @@ for (@prgs) {
     1 while unlink $alifile;
     }
 
+# [perl #30409] charnames.pm clobbers default variable
+$_ = 'foobar';
+eval "use charnames ':full';";
+print "not " unless $_ eq 'foobar';
+print "ok 74\n";
+
 __END__
 # unsupported pragma
 use charnames ":scoobydoo";