line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Unicode::Collate::CJK::Zhuyin; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
957
|
use 5.006; |
|
4
|
|
|
|
|
14
|
|
4
|
4
|
|
|
4
|
|
27
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
96
|
|
5
|
4
|
|
|
4
|
|
20
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
960
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.28'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my %u2p; |
10
|
|
|
|
|
|
|
my $wt = 0x8000; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
while () { |
13
|
|
|
|
|
|
|
last if /^__END__/; |
14
|
|
|
|
|
|
|
my @c = split; |
15
|
|
|
|
|
|
|
for my $c (@c) { |
16
|
|
|
|
|
|
|
next if !$c; |
17
|
|
|
|
|
|
|
$u2p{hex($c)} = $wt if $c !~ /-/; |
18
|
|
|
|
|
|
|
$wt++; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub weightZhuyin { |
23
|
2017
|
|
|
2017
|
0
|
3174
|
my $u = shift; |
24
|
2017
|
100
|
|
|
|
9523
|
return exists $u2p{$u} ? $u2p{$u} : undef; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
__DATA__ |