line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Duadua::Parser::Browser::DuckDuckGo; |
2
|
6
|
|
|
6
|
|
34
|
use strict; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
156
|
|
3
|
6
|
|
|
6
|
|
26
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
113
|
|
4
|
6
|
|
|
6
|
|
27
|
use Duadua::Util; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
971
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub try { |
7
|
132
|
|
|
132
|
1
|
336
|
my ($class, $d) = @_; |
8
|
|
|
|
|
|
|
|
9
|
132
|
50
|
66
|
|
|
278
|
if ( index($d->ua, ' DuckDuckGo/') > -1 && index($d->ua, ' Mobile/') > -1 && index($d->ua, 'Mozilla/') > -1 ) { |
|
|
|
66
|
|
|
|
|
10
|
2
|
|
|
|
|
10
|
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
|
|
|
|
14
|
$h->{version} = $version if $version; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
2
|
|
|
|
|
16
|
return Duadua::Util->set_os($d, $h); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |