line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::NHKProgram::API::Genre; |
2
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
3
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
4
|
1
|
|
|
1
|
|
4
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
5
|
1
|
|
|
1
|
|
21
|
use Encode qw/decode_utf8/; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
49
|
|
6
|
1
|
|
|
1
|
|
926
|
use TV::ARIB::ProgramGenre qw/get_genre_id/; |
|
1
|
|
|
|
|
1155
|
|
|
1
|
|
|
|
|
67
|
|
7
|
1
|
|
|
1
|
|
7
|
use parent qw/Exporter/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
8
|
|
|
|
|
|
|
our @EXPORT_OK = qw/fetch_genre_id/; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub fetch_genre_id { |
11
|
0
|
|
|
0
|
0
|
|
my $arg = shift; |
12
|
|
|
|
|
|
|
|
13
|
0
|
0
|
|
|
|
|
if ($arg =~ /\A\d{4}\Z/) { |
14
|
0
|
|
|
|
|
|
return $arg; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
eval { $arg = decode_utf8($arg) }; |
|
0
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
my $id = get_genre_id($arg); |
19
|
0
|
|
|
|
|
|
return sprintf("%02d%02d", $id->[0], $id->[1]); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|