Branch Coverage

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


line true false branch
19 1 8 if exists $opts{'ver'} and 2 != $opts{'ver'}
20 1 7 unless exists $opts{'key'}
55 9 4 if ($meth eq 'GET')
63 10 4 if ($meth eq 'GET') { }
3 1 elsif ($meth eq 'POST') { }
72 8 5 unless ($self->{'ua'}->responseCode =~ /400|50./)
74 7 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'}
121 2 7 unless (exists $args{$mand})
139 1 2 if defined $args{'comment'}
154 4 3 if (exists $args{'limit'})
155 1 3 unless ($args{'limit'} =~ /^[0-9]+$/)
159 1 2 if ($args{'limit'} < 1)
166 4 1 if (exists $args{'min_abuse'})
167 1 3 unless ($args{'min_abuse'} =~ /^[0-9]+$/)
171 1 2 if ($args{'min_abuse'} < 25)
175 1 1 if ($args{'min_abuse'} > 100)