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 11     11   86 use strict;
  11         24  
  11         421  
3 11     11   55 use warnings;
  11         17  
  11         607  
4 11     11   59 use Duadua::Util qw//;
  11         24  
  11         2431  
5              
6             sub try {
7 71     71 1 154 my ($class, $d) = @_;
8              
9 71 100       171 if ( $d->_contain(' Feedspot/') ) {
10 2         217 my $h = {
11             name => 'Feedspot',
12             is_bot => 1,
13             };
14              
15 2 100       13 if ($d->opt_version) {
16 1         4 my ($version) = ($d->ua =~ m! Feedspot/([\d.]+)!);
17 1 50       18 $h->{version} = $version if $version;
18             }
19              
20 2         10 return $h;
21             }
22             }
23              
24             1;
25              
26             __END__