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 11     11   84 use strict;
  11         22  
  11         658  
3 11     11   58 use warnings;
  11         16  
  11         546  
4 11     11   51 use Duadua::Util qw//;
  11         19  
  11         2560  
5              
6             sub try {
7 75     75 1 160 my ($class, $d) = @_;
8              
9 75 100       189 if ( $d->_contain('Fastladder ') ) {
10 3         16 my $h = {
11             name => 'Fastladder',
12             is_bot => 1,
13             };
14              
15 3 100       13 if ($d->opt_version) {
16 1         5 my ($version) = ($d->ua =~ m!^Fastladder FeedFetcher/([\d.]+)!);
17 1 50       7 $h->{version} = $version if $version;
18             }
19              
20 3         16 return Duadua::Util->set_os($d, $h);
21             }
22             }
23              
24             1;
25              
26             __END__