Branch Coverage

blib/lib/WebService/AbuseIPDB.pm
Criterion Covered Total %
branch 42 42 100.0


line true false branch
19 1 9 if exists $opts{'ver'} and 2 != $opts{'ver'}
20 1 8 unless exists $opts{'key'}
55 11 4 if ($meth eq 'GET')
63 12 4 if ($meth eq 'GET') { }
3 1 elsif ($meth eq 'POST') { }
72 10 5 unless ($self->{'ua'}->responseCode =~ /400|50./)
74 9 1 if $self->{'ua'}->responseHeader('Content-type') eq 'application/json'
82 3 1 if ($self->{'ua'}->responseCode > 499)
103 1 7 unless (exists $args{'ip'})
110 5 2 if exists $args{'max_age'}
119 1 2 unless (exists $args{'ip'})
126 1 1 if exists $args{'max_age'}
135 2 7 unless (exists $args{$mand})
153 1 2 if defined $args{'comment'}
168 4 3 if (exists $args{'limit'})
169 1 3 unless ($args{'limit'} =~ /^[0-9]+$/)
173 1 2 if ($args{'limit'} < 1)
180 4 1 if (exists $args{'min_abuse'})
181 1 3 unless ($args{'min_abuse'} =~ /^[0-9]+$/)
185 1 2 if ($args{'min_abuse'} < 25)
189 1 1 if ($args{'min_abuse'} > 100)