File Coverage

blib/lib/Duadua/Parser/Bot/Fastladder.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::Fastladder;
2 6     6   38 use strict;
  6         12  
  6         169  
3 6     6   28 use warnings;
  6         12  
  6         146  
4 6     6   33 use Duadua::Util qw//;
  6         11  
  6         1186  
5              
6             sub try {
7 66     66 1 139 my ($class, $d) = @_;
8              
9 66 100       140 if ( index($d->ua, 'Fastladder ') > -1 ) {
10 3         13 my $h = {
11             name => 'Fastladder',
12             is_bot => 1,
13             };
14              
15 3 100       9 if ($d->opt_version) {
16 1         5 my ($version) = ($d->ua =~ m!^Fastladder FeedFetcher/([\d.]+)!);
17 1 50       6 $h->{version} = $version if $version;
18             }
19              
20 3         13 return Duadua::Util->set_os($d, $h);
21             }
22             }
23              
24             1;
25              
26             __END__