Manual integration error in #12235.
[p5sagit/p5-mst-13.2.git] / lib / utf8_heavy.pl
index 2327d3d..a90e24c 100644 (file)
@@ -24,19 +24,22 @@ sub SWASHNEW {
     my $caller;
     my $i = 0;
     while (($caller = caller($i)) eq __PACKAGE__) { $i++ }
-    my $encoding = $enc{$caller} || "unicode";
+    my $encoding = $enc{$caller} || "unicore";
     (my $file = $type) =~ s!::!/!g;
     if ($file =~ /^In(.+)/) {
+       my $In = $1;
        defined %utf8::In || do "$encoding/In.pl";
-       if (exists $utf8::In{$1}) {
-           $file = "$enconding/In/$utf8::In{$1}";
+       if (exists $utf8::In{$In}) {
+           $file = "$encoding/In/$utf8::In{$In}";
        }
     } else {
        $file =~ s#^(Is|To)([A-Z].*)#$1/$2#;
     }
 
     {
-       $list ||= ($caller ne 'main' && eval { $caller->$type(); })
+        $list ||=
+           ( exists &{"${caller}::${type}"} &&
+             eval { $caller->$type() } )
            || do "$file.pl"
            || do "$encoding/$file.pl"
            || do "$encoding/Is/${type}.pl"