line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Woothee::Appliance; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
39
|
use strict; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
186
|
|
4
|
6
|
|
|
6
|
|
294
|
use warnings; |
|
6
|
|
|
|
|
19
|
|
|
6
|
|
|
|
|
162
|
|
5
|
6
|
|
|
6
|
|
32
|
use Carp; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
375
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
41
|
use Woothee::Util qw/update_map update_category update_version update_os update_os_version/; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
350
|
|
8
|
6
|
|
|
6
|
|
36
|
use Woothee::DataSet qw/dataset/; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
3447
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = "1.7.0"; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub challenge_playstation { |
13
|
255
|
|
|
255
|
0
|
405
|
my ($ua, $result) = @_; |
14
|
|
|
|
|
|
|
|
15
|
255
|
|
|
|
|
351
|
my $data; |
16
|
|
|
|
|
|
|
my $os_version; |
17
|
|
|
|
|
|
|
|
18
|
255
|
100
|
100
|
|
|
1530
|
if (index($ua, "PSP (PlayStation Portable);") > -1) { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
19
|
3
|
50
|
|
|
|
25
|
if ($ua =~ m!PSP \(PlayStation Portable\); ([.0-9]+)\)!) { |
20
|
3
|
|
|
|
|
10
|
$os_version = $1; |
21
|
|
|
|
|
|
|
} |
22
|
3
|
|
|
|
|
9
|
$data = dataset("PSP"); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
elsif (index($ua, "PlayStation Vita") > -1) { |
25
|
3
|
50
|
|
|
|
25
|
if ($ua =~ m!PlayStation Vita ([.0-9]+)\)!) { |
26
|
3
|
|
|
|
|
9
|
$os_version = $1; |
27
|
|
|
|
|
|
|
} |
28
|
3
|
|
|
|
|
10
|
$data = dataset("PSVita"); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
elsif (index($ua, "PLAYSTATION 3 ") > -1 || index($ua, "PLAYSTATION 3;") > -1) { |
31
|
6
|
50
|
|
|
|
44
|
if ($ua =~ m!PLAYSTATION 3;? ([.0-9]+)\)!) { |
32
|
6
|
|
|
|
|
14
|
$os_version = $1; |
33
|
|
|
|
|
|
|
} |
34
|
6
|
|
|
|
|
16
|
$data = dataset("PS3"); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
elsif (index($ua, "PlayStation 4 ") > -1) { |
37
|
3
|
50
|
|
|
|
25
|
if ($ua =~ m!PlayStation 4 ([.0-9]+)\)!) { |
38
|
3
|
|
|
|
|
8
|
$os_version = $1; |
39
|
|
|
|
|
|
|
} |
40
|
3
|
|
|
|
|
10
|
$data = dataset("PS4"); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
255
|
100
|
|
|
|
680
|
return 0 unless $data; |
44
|
|
|
|
|
|
|
|
45
|
15
|
|
|
|
|
34
|
update_map($result, $data); |
46
|
15
|
50
|
|
|
|
35
|
if ($os_version) { |
47
|
15
|
|
|
|
|
31
|
update_os_version($result, $os_version); |
48
|
|
|
|
|
|
|
} |
49
|
15
|
|
|
|
|
45
|
return 1; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub challenge_nintendo { |
53
|
240
|
|
|
240
|
0
|
390
|
my ($ua, $result) = @_; |
54
|
|
|
|
|
|
|
|
55
|
240
|
|
|
|
|
291
|
my $data; |
56
|
|
|
|
|
|
|
|
57
|
240
|
100
|
|
|
|
1056
|
if (index($ua, "Nintendo 3DS;") > -1) { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
58
|
3
|
|
|
|
|
12
|
$data = dataset("Nintendo3DS"); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
elsif (index($ua, "Nintendo DSi;") > -1) { |
61
|
0
|
|
|
|
|
0
|
$data = dataset("NintendoDSi"); |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
elsif (index($ua, "Nintendo Wii;") > -1) { |
64
|
0
|
|
|
|
|
0
|
$data = dataset("NintendoWii"); |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
elsif (index($ua, "(Nintendo WiiU)") > -1) { |
67
|
3
|
|
|
|
|
8
|
$data = dataset("NintendoWiiU"); |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
240
|
100
|
|
|
|
650
|
return 0 unless $data; |
71
|
|
|
|
|
|
|
|
72
|
6
|
|
|
|
|
24
|
update_map($result, $data); |
73
|
6
|
|
|
|
|
20
|
return 1; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
# for Xbox Series, see OS.pm (Windows) |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub challenge_digitaltv { |
79
|
234
|
|
|
234
|
0
|
386
|
my ($ua, $result) = @_; |
80
|
|
|
|
|
|
|
|
81
|
234
|
|
|
|
|
263
|
my $data; |
82
|
|
|
|
|
|
|
|
83
|
234
|
100
|
|
|
|
530
|
if (index($ua, "InettvBrowser/") > -1) { |
84
|
12
|
|
|
|
|
29
|
$data = dataset("DigitalTV"); |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
234
|
100
|
|
|
|
565
|
return 0 unless $data; |
88
|
|
|
|
|
|
|
|
89
|
12
|
|
|
|
|
32
|
update_map($result, $data); |
90
|
12
|
|
|
|
|
39
|
return 1; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
1; |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
__END__ |