File Coverage

blib/lib/Duadua/Parser/Bot/GoogleRead.pm
Criterion Covered Total %
statement 15 15 100.0
branch 4 4 100.0
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 24 24 100.0


line stmt bran cond sub pod time code
1             package Duadua::Parser::Bot::GoogleRead;
2 6     6   36 use strict;
  6         12  
  6         152  
3 6     6   26 use warnings;
  6         12  
  6         125  
4 6     6   31 use Duadua::Util;
  6         12  
  6         695  
5              
6             sub try {
7 335     335 1 836 my ($class, $d) = @_;
8              
9 335 100       787 if ($d->ua eq 'google-speakr') {
10             return {
11 1         6 name => 'google-speakr',
12             is_bot => 1,
13             };
14             }
15              
16 334 100       777 if ( index($d->ua, 'Google-Read-Aloud') > -1 ) {
17 1         5 my $h = {
18             name => 'Google-Read-Aloud',
19             is_bot => 1,
20             };
21 1         7 return Duadua::Util->set_os($d, $h);
22             }
23             }
24              
25             1;
26              
27             __END__