| 1 | package Unicode::Collate::CJK::JISX0208; | ||||||||||
| 2 | |||||||||||
| 3 | 5 | ▶ | use 5.006; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 5 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 5 | our $VERSION = '1.31'; | |||||||||
| 8 | |||||||||||
| 9 | 5 | my %u2p; | |||||||||
| 10 | 5 | my $wt = 0x8000; | |||||||||
| 11 | |||||||||||
| 12 | 5 | ▶ | while (<DATA>) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | 3185 | ▶ | last if /^__END__/; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 3180 | my @c = split; | |||||||||
| 15 | 3180 | for my $c (@c) { | |||||||||
| 16 | 31775 | ▶ | next if !$c; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 31775 | $u2p{hex($c)} = $wt; | |||||||||
| 18 | 31775 | $wt++; | |||||||||
| 19 | } | ||||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 1092 | ▶ | sub weightJISX0208 { | ||||||||
|
Subroutine
weightJISX0208: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 23 | 1092 | my $u = shift; | |||||||||
| 24 | 1092 | ▶ | return exists $u2p{$u} ? $u2p{$u} : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 5 | 1; | |||||||||
| 28 | __DATA__ | ||||||||||