File Coverage

blib/lib/Duadua/Parser/Bot/GooglebotAd.pm
Criterion Covered Total %
statement 16 16 100.0
branch 6 6 100.0
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 27 27 100.0


line stmt bran cond sub pod time code
1             package Duadua::Parser::Bot::GooglebotAd;
2 11     11   66 use strict;
  11         23  
  11         469  
3 11     11   49 use warnings;
  11         61  
  11         595  
4 11     11   67 use Duadua::Util;
  11         99  
  11         1656  
5              
6             sub try {
7 339     339 1 1237 my ($class, $d) = @_;
8              
9 339 100       746 return unless $d->_contain('Google');
10              
11 36 100       115 if ( $d->_contain('Mediapartners-Google') ) {
12 3         16 my $h = {
13             name => 'Mediapartners-Google',
14             is_bot => 1,
15             };
16              
17 3         21 return Duadua::Util->set_os($d, $h);
18             }
19              
20 33 100       82 if ( $d->_contain('AdsBot-Google') ) {
21             return {
22 1         8 name => 'AdsBot-Google',
23             is_bot => 1,
24             };
25             }
26             }
27              
28             1;
29              
30             __END__