Branch Coverage

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


line true false branch
19 1 6 if exists $opts{'ver'} and 2 != $opts{'ver'}
20 1 5 unless exists $opts{'key'}
55 5 4 if ($meth eq 'GET')
63 7 4 if ($meth eq 'GET') { }
3 1 elsif ($meth eq 'POST') { }
72 7 3 unless ($self->{'ua'}->responseCode =~ /[45]00/)
74 6 1 if $self->{'ua'}->responseHeader('Content-type') eq 'application/json'
90 1 3 unless (exists $args{'ip'})
97 1 2 if exists $args{'max_age'}
108 2 7 unless (exists $args{$mand})
126 1 2 if defined $args{'comment'}
141 4 3 if (exists $args{'limit'})
142 1 3 unless ($args{'limit'} =~ /^[0-9]+$/)
146 1 2 if ($args{'limit'} < 1)
153 4 1 if (exists $args{'min_abuse'})
154 1 3 unless ($args{'min_abuse'} =~ /^[0-9]+$/)
158 1 2 if ($args{'min_abuse'} < 25)
162 1 1 if ($args{'min_abuse'} > 100)