line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Unicode::Collate::CJK::Stroke; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
1021
|
use 5.006; |
|
4
|
|
|
|
|
19
|
|
4
|
4
|
|
|
4
|
|
27
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
116
|
|
5
|
4
|
|
|
4
|
|
22
|
use warnings; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
1074
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.30'; |
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 weightStroke { |
23
|
2019
|
|
|
2019
|
0
|
3211
|
my $u = shift; |
24
|
2019
|
100
|
|
|
|
9423
|
return exists $u2p{$u} ? $u2p{$u} : undef; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
__DATA__ |