File Coverage

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


line stmt bran cond sub pod time code
1             package Duadua::Parser::Bot::Feedspot;
2 6     6   804 use strict;
  6         10  
  6         164  
3 6     6   28 use warnings;
  6         12  
  6         133  
4 6     6   25 use Duadua::Util qw//;
  6         9  
  6         895  
5              
6             sub try {
7 62     62 1 174 my ($class, $d) = @_;
8              
9 62 100       145 if ( index($d->ua, ' Feedspot/') > -1 ) {
10 2         7 my $h = {
11             name => 'Feedspot',
12             is_bot => 1,
13             };
14              
15 2 100       5 if ($d->opt_version) {
16 1         3 my ($version) = ($d->ua =~ m! Feedspot/([\d.]+)!);
17 1 50       5 $h->{version} = $version if $version;
18             }
19              
20 2         18 return $h;
21             }
22             }
23              
24             1;
25              
26             __END__