sub getEncoding
{
my ($class, $name, $skip_external) = @_;
ref($name) && $name->can('renew') and return $name;
exists $Encoding{$name} and return $Encoding{$name};
my $lc = lc $name;
exists $Encoding{$lc} and return $Encoding{$lc};
my $oc = $class->find_alias($name);
defined($oc) and return $oc;
$lc ne $name and $oc = $class->find_alias($lc);
defined($oc) and return $oc;
unless ($skip_external)
{
if (my $mod = $ExtModule{$name} || $ExtModule{$lc}){
$mod =~ s,::,/,g ; $mod .= '.pm';
eval{ require $mod; }; <--- HERE
exists $Encoding{$name} and return $Encoding{$name};
}
}
return;
}
####
print STDERR "$_\n" for grep {/Encode/} sort keys %INC;
####
use Encode;
use Encode::Unicode;