Branch Coverage

blib/lib/Net/Google/SafeBrowsing4.pm
Criterion Covered Total %
branch 18 148 12.1


line true false branch
190 2 11 unless ($self->{'key'})
191 0 2 if $self->{'logger'}
195 1 10 unless ($self->{'http_agent'})
196 0 1 if $self->{'logger'}
203 1 9 unless ($self->{'storage'})
204 0 1 if $self->{'logger'}
208 0 9 if (ref $self->{'lists'} ne 'ARRAY')
258 0 0 if ($time > &Net::Google::SafeBrowsing4::time() and $force == 0) { }
259 0 0 if $self->{'logger'}
264 0 0 if $self->{'logger'}
284 0 0 if $self->{'logger'}
285 0 0 if $self->{'logger'}
287 0 0 unless ($response->is_success)
288 0 0 if $self->{'logger'}
318 0 0 if (scalar @hex > 0)
319 0 0 if $result >= 0
332 0 0 $list->{'responseType'} eq 'FULL_UPDATE' ? :
335 0 0 if ($check ne $list->{'checksum'}{'sha256'}) { }
336 0 0 if $self->{'logger'}
348 0 0 if $self->{'logger'}
358 0 0 if ($wait =~ /(\d+)(\.\d+)?s/i)
412 0 0 unless ($args{'url'})
416 0 0 if (ref $args{'url'} eq '') { }
0 0 elsif (ref $args{'url'} ne 'ARRAY') { }
419 0 0 if $self->{'logger'}
428 0 0 unless ($gsb_uri)
429 0 0 if $self->{'logger'}
437 0 0 if $self->{'perf'} and $self->{'logger'}
485 0 6 if $self->{'logger'}
486 0 6 if $self->{'logger'}
488 1 5 unless ($response->is_success)
497 3 2 if ($@ or ref $info ne 'HASH')
502 1 1 unless (exists $info->{'threatLists'})
528 0 0 if $self->{'logger'}
532 0 0 if $self->{'perf'} and $self->{'logger'}
533 0 0 if (scalar @prefixes == 0)
534 0 0 if $self->{'logger'}
537 0 0 if $self->{'logger'}
547 0 0 if (scalar @matches > 0)
553 0 0 if $self->{'logger'}
554 0 0 if $self->{'perf'} and $self->{'logger'}
556 0 0 if (scalar keys %$lookup_hashes == 0)
560 0 0 if $self->{'logger'}
561 0 0 if ($found > 0)
569 0 0 if $self->{'perf'} and $self->{'logger'}
573 0 0 if scalar @matches > 0
574 0 0 if $self->{'perf'} and $self->{'logger'}
578 0 0 if $self->{'perf'} and $self->{'logger'}
591 0 0 unless $args{'lists'} or $self->{'lists'}
593 0 0 if (scalar @lists == 0)
594 0 0 if (scalar @{$self->{'all_lists'};} == 0)
604 0 0 unless ($list =~ m[^[*_A-Z]+/[*_A-Z]+/[*_A-Z]+$])
605 0 0 if $self->{'logger'}
608 0 0 if ($list =~ /\*/) { }
0 0 elsif ($list =~ m[^([_A-Z]+)/([_A-Z]+)/([_A-Z]+)$]) { }
611 0 0 if (scalar @{$self->{'all_lists'};} == 0)
616 0 0 if ($threat eq '*' || $original->{'threatType'} eq $threat and $platform eq '*' || $original->{'platformType'} eq $platform and $threatEntry eq '*' || $original->{'threatEntryType'} eq $threatEntry)
651 0 0 unless exists $info->{'errors'}
655 0 0 $errors > 5 ? :
0 0 $errors == 5 ? :
0 0 $errors == 4 ? :
0 0 $errors == 3 ? :
0 0 $errors == 2 ? :
0 0 $errors == 1 ? :
696 0 0 unless $args{'prefixes'}
711 0 0 unless (defined &first(sub { $_->{'threatEntryType'} eq $info->{'list'}{'threatEntryType'} if $_->{'threatType'} eq $info->{'list'}{'threatType'} and $_->{'platformType'} eq $info->{'list'}{'platformType'}; } , @lists))
716 0 0 if $_->{'threatType'} eq $info->{'list'}{'threatType'} and $_->{'platformType'} eq $info->{'list'}{'platformType'}
747 0 0 if $self->{'logger'}
748 0 0 if $self->{'logger'}
750 0 0 if (not $response->is_success) { }
751 0 0 if $self->{'logger'}
769 0 0 if $self->{'logger'}
791 0 0 if ($data eq '')
796 0 0 if (not exists $info->{'matches'} or scalar @{$info->{'matches'};} == 0)