line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Duadua::Parser::Browser::DuckDuckGo; |
2
|
6
|
|
|
6
|
|
868
|
use strict; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
169
|
|
3
|
6
|
|
|
6
|
|
29
|
use warnings; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
128
|
|
4
|
6
|
|
|
6
|
|
30
|
use Duadua::Util; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
1163
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub try { |
7
|
132
|
|
|
132
|
1
|
275
|
my ($class, $d) = @_; |
8
|
|
|
|
|
|
|
|
9
|
132
|
50
|
66
|
|
|
302
|
if ( index($d->ua, ' DuckDuckGo/') > -1 && index($d->ua, ' Mobile/') > -1 && index($d->ua, 'Mozilla/') > -1 ) { |
|
|
|
66
|
|
|
|
|
10
|
2
|
|
|
|
|
7
|
my $h = { |
11
|
|
|
|
|
|
|
name => 'DuckDuckGo', |
12
|
|
|
|
|
|
|
}; |
13
|
|
|
|
|
|
|
|
14
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
15
|
1
|
|
|
|
|
3
|
my ($version) = ($d->ua =~ m! DuckDuckGo/([\d.]+)!); |
16
|
1
|
50
|
|
|
|
7
|
$h->{version} = $version if $version; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
2
|
|
|
|
|
8
|
return Duadua::Util->set_os($d, $h); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |