Lingua-Han-Stroke
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Lingua/Han/Stroke.pm view on Meta::CPAN
my $self;
my %st;
my $file = File::Spec->catfile($dir, 'Stroke.dat');
open(FH, $file) or die "$file: $!";
while(<FH>) {
my ($uni, $st) = split(/\s+/);
$st{$uni} = $st;
}
close(FH);
$self->{'st'} = \%st;
return bless $self => $class;
}
sub stroke {
my ($self, $hanzi) = @_;
my $code = Unihan_value($hanzi); # got the Unihan field 1
return $self->{'st'}->{$code};
}
1;
__END__
=encoding utf8
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.425 second using v1.00-cache-2.02-grep-82fe00e-cpan-a086c87fca4 )