line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Duadua::Parser::Browser::Opera; |
2
|
6
|
|
|
6
|
|
36
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
156
|
|
3
|
6
|
|
|
6
|
|
25
|
use warnings; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
115
|
|
4
|
6
|
|
|
6
|
|
25
|
use Duadua::Util; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
1929
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub try { |
7
|
317
|
|
|
317
|
1
|
572
|
my ($class, $d) = @_; |
8
|
|
|
|
|
|
|
|
9
|
317
|
100
|
|
|
|
744
|
if ( index($d->ua, 'Opera/') > -1 ) { |
10
|
2
|
|
|
|
|
6
|
my $h = { |
11
|
|
|
|
|
|
|
name => 'Opera', |
12
|
|
|
|
|
|
|
}; |
13
|
|
|
|
|
|
|
|
14
|
2
|
100
|
|
|
|
18
|
if ($d->opt_version) { |
15
|
1
|
|
|
|
|
3
|
my ($version) = ($d->ua =~ m!a/([\d.]+) \(!); |
16
|
1
|
50
|
|
|
|
7
|
$h->{version} = $version if $version; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
2
|
|
|
|
|
10
|
return Duadua::Util->set_os($d, $h); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
315
|
100
|
66
|
|
|
784
|
if ( index($d->ua, ' OPR/') > -1 && index($d->ua, 'Mozilla/') > -1 ) { |
23
|
2
|
|
|
|
|
5
|
my $h = { |
24
|
|
|
|
|
|
|
name => 'Opera', |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
|
27
|
2
|
100
|
|
|
|
8
|
if ($d->opt_version) { |
28
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m! OPR/([\d.]+)!); |
29
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
2
|
|
|
|
|
11
|
return Duadua::Util->set_os($d, $h); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
313
|
100
|
66
|
|
|
656
|
if ( index($d->ua, ' OPT/') > -1 && index($d->ua, 'Mozilla/') > -1 ) { |
36
|
2
|
|
|
|
|
6
|
my $h = { |
37
|
|
|
|
|
|
|
name => 'Opera Touch', |
38
|
|
|
|
|
|
|
}; |
39
|
|
|
|
|
|
|
|
40
|
2
|
100
|
|
|
|
16
|
if ($d->opt_version) { |
41
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m! OPT/([\d.]+)!); |
42
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
2
|
|
|
|
|
8
|
return Duadua::Util->set_os($d, $h); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |