File Coverage

blib/lib/Duadua/Parser/Bot/QuiteRSS.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::QuiteRSS;
2 11     11   99 use strict;
  11         23  
  11         439  
3 11     11   49 use warnings;
  11         21  
  11         534  
4 11     11   57 use Duadua::Util qw//;
  11         19  
  11         2444  
5              
6             sub try {
7 80     80 1 190 my ($class, $d) = @_;
8              
9 80 100       169 if ( $d->_contain(' QuiteRSS') ) {
10 2         8 my $h = {
11             name => 'QuiteRSS',
12             is_bot => 1,
13             };
14              
15 2 100       3 if ($d->opt_version) {
16 1         4 my ($version) = ($d->ua =~ m! QuiteRSS/([\d.]+)!);
17 1 50       5 $h->{version} = $version if $version;
18             }
19              
20 2         5 return Duadua::Util->set_os($d, $h);
21             }
22             }
23              
24             1;
25              
26             __END__