line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geography::JapanesePrefectures; |
2
|
2
|
|
|
2
|
|
59491
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
65
|
|
3
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
54
|
|
4
|
2
|
|
|
2
|
|
39
|
use 5.008001; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
122
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.11'; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
1044
|
use Geography::JapanesePrefectures::Unicode; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
67
|
|
8
|
2
|
|
|
2
|
|
11
|
use Carp (); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
28
|
|
9
|
2
|
|
|
2
|
|
492803
|
use Encode (); |
|
2
|
|
|
|
|
63860
|
|
|
2
|
|
|
|
|
821
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub prefectures { |
12
|
1
|
|
|
1
|
0
|
1339
|
my $self = shift; |
13
|
|
|
|
|
|
|
return |
14
|
1
|
|
|
|
|
11
|
map { Encode::encode_utf8($_) } |
|
47
|
|
|
|
|
225
|
|
15
|
|
|
|
|
|
|
Geography::JapanesePrefectures::Unicode->prefectures(); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub regions { |
19
|
2
|
|
|
2
|
0
|
2400
|
my $self = shift; |
20
|
|
|
|
|
|
|
return |
21
|
2
|
|
|
|
|
11
|
map { Encode::encode_utf8($_) } |
|
22
|
|
|
|
|
79
|
|
22
|
|
|
|
|
|
|
Geography::JapanesePrefectures::Unicode->regions(); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub prefectures_in { |
26
|
1
|
|
|
1
|
0
|
2179
|
my ( $self, $region ) = @_; |
27
|
|
|
|
|
|
|
return |
28
|
1
|
|
|
|
|
7
|
map { Encode::encode_utf8($_) } |
|
8
|
|
|
|
|
38
|
|
29
|
|
|
|
|
|
|
Geography::JapanesePrefectures::Unicode->prefectures_in( |
30
|
|
|
|
|
|
|
Encode::decode_utf8($region) ); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub prefectures_id { |
34
|
1
|
|
|
1
|
0
|
1565
|
my ( $self, $prefecture ) = @_; |
35
|
1
|
|
|
|
|
6
|
return Geography::JapanesePrefectures::Unicode->prefectures_id( |
36
|
|
|
|
|
|
|
Encode::decode_utf8($prefecture) ); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub prefectures_infos { |
40
|
6
|
|
|
6
|
0
|
1800
|
my $infos = Geography::JapanesePrefectures::Unicode->prefectures_infos; |
41
|
6
|
|
|
|
|
7
|
my @ret; |
42
|
6
|
|
|
|
|
13
|
for my $info (@$infos) { |
43
|
282
|
|
|
|
|
250
|
my %row; |
44
|
282
|
|
|
|
|
686
|
while (my ($key, $val) = each %$info) { |
45
|
1128
|
|
|
|
|
6159
|
$row{$key} = Encode::encode_utf8($val); |
46
|
|
|
|
|
|
|
} |
47
|
282
|
|
|
|
|
2599
|
push @ret, \%row; |
48
|
|
|
|
|
|
|
} |
49
|
6
|
|
|
|
|
51
|
return \@ret; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
__END__ |