line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Duadua::Parser::Bot::MailRUBot; |
2
|
6
|
|
|
6
|
|
937
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
172
|
|
3
|
6
|
|
|
6
|
|
29
|
use warnings; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
528
|
|
4
|
6
|
|
|
6
|
|
40
|
use Duadua::Util qw//; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
1015
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub try { |
7
|
126
|
|
|
126
|
1
|
259
|
my ($class, $d) = @_; |
8
|
|
|
|
|
|
|
|
9
|
126
|
100
|
|
|
|
267
|
if ( index($d->ua, ' Mail.RU_Bot/') > -1 ) { |
10
|
4
|
|
|
|
|
17
|
my $h = { |
11
|
|
|
|
|
|
|
name => 'Mail.RU_Bot', |
12
|
|
|
|
|
|
|
is_bot => 1, |
13
|
|
|
|
|
|
|
}; |
14
|
|
|
|
|
|
|
|
15
|
4
|
100
|
|
|
|
118
|
if ($d->opt_version) { |
16
|
2
|
|
|
|
|
6
|
my ($version) = ($d->ua =~ m! Mail\.RU_Bot(?:/[a-zA-Z]+)?/([\d.]+)!); |
17
|
2
|
50
|
|
|
|
9
|
$h->{version} = $version if $version; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
4
|
|
|
|
|
88
|
return $h; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |