File Coverage

blib/lib/Duadua/Parser/Bot/Reeder.pm
Criterion Covered Total %
statement 13 13 100.0
branch 5 6 83.3
condition n/a
subroutine 3 3 100.0
pod 1 1 100.0
total 22 23 95.6


line stmt bran cond sub pod time code
1             package Duadua::Parser::Bot::Reeder;
2 11     11   1186 use strict;
  11         20  
  11         469  
3 11     11   51 use warnings;
  11         28  
  11         2588  
4              
5             sub try {
6 82     82 1 183 my ($class, $d) = @_;
7              
8 82 100       204 if ( $d->_contain('Reeder/') ) {
9 2         12 my $h = {
10             name => 'Reeder',
11             is_bot => 1,
12             };
13              
14 2 100       140 if ($d->opt_version) {
15 1         4 my ($version) = ($d->ua =~ m!^Reeder/([\d.]+)!);
16 1 50       5 $h->{version} = $version if $version;
17             }
18              
19 2         22 return $h;
20             }
21             }
22              
23             1;
24              
25             __END__