Branch Coverage

blib/lib/Net/Google/SafeBrowsing4.pm
Criterion Covered Total %
branch 18 162 11.1


line true false branch
200 2 11 unless ($self->{'key'})
201 0 2 if $self->{'logger'}
205 1 10 unless ($self->{'http_agent'})
206 0 1 if $self->{'logger'}
213 1 9 unless ($self->{'storage'})
214 0 1 if $self->{'logger'}
218 0 9 if (ref $self->{'lists'} ne 'ARRAY')
268 0 0 if ($time > &Net::Google::SafeBrowsing4::time() and $force == 0) { }
269 0 0 if $self->{'logger'}
273 0 0 if $self->{'logger'}
293 0 0 if $self->{'logger'}
294 0 0 if $self->{'logger'}
296 0 0 unless ($response->is_success)
297 0 0 if $self->{'logger'}
326 0 0 if (scalar @hex > 0)
327 0 0 if $result >= 0
340 0 0 $list->{'responseType'} eq 'FULL_UPDATE' ? :
343 0 0 if ($check ne $list->{'checksum'}{'sha256'}) { }
344 0 0 if $self->{'logger'}
356 0 0 if $self->{'logger'}
366 0 0 if ($wait =~ /(\d+)(\.\d+)?s/i)
410 0 6 if $self->{'logger'}
411 0 6 if $self->{'logger'}
413 1 5 unless ($response->is_success)
422 3 2 if ($@ or ref $info ne 'HASH')
427 1 1 unless (exists $info->{'threatLists'})
485 0 0 unless ($args{'url'})
489 0 0 if (ref $args{'url'} eq '') { }
0 0 elsif (ref $args{'url'} ne 'ARRAY') { }
492 0 0 if $self->{'logger'}
495 0 0 if $self->{'logger'}
500 0 0 if $self->{'perf'}
504 0 0 unless ($gsb_uri)
505 0 0 if $self->{'logger'}
517 0 0 if $self->{'perf'} and $self->{'logger'}
520 0 0 if $self->{'perf'}
522 0 0 if $self->{'logger'}
524 0 0 if (scalar @matched_prefixes == 0)
525 0 0 if $self->{'logger'}
531 0 0 if $self->{'logger'}
536 0 0 if $lookup_hashes->{$_} eq ''
537 0 0 if $self->{'perf'} and $self->{'logger'}
541 0 0 if $self->{'perf'}
542 0 0 if $self->{'logger'}
547 0 0 if (scalar @hash_matches > 0)
555 0 0 if $urls->{$_}{'parent'} eq $urls->{$found_hash}{'parent'}
559 0 0 if $self->{'logger'}
560 0 0 if $self->{'perf'} and $self->{'logger'}
564 0 0 if $self->{'perf'}
566 0 0 if (scalar keys %needed_prefixes > 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'}
606 0 0 unless $args{'lists'} or $self->{'lists'}
608 0 0 if (scalar @lists == 0)
609 0 0 if (scalar @{$self->{'all_lists'};} == 0)
611 0 0 if (scalar @$lists == 0)
622 0 0 unless ($list =~ m[^[*_A-Z]+/[*_A-Z]+/[*_A-Z]+$])
623 0 0 if $self->{'logger'}
626 0 0 if ($list =~ /\*/) { }
0 0 elsif ($list =~ m[^([_A-Z]+)/([_A-Z]+)/([_A-Z]+)$]) { }
629 0 0 if (scalar @{$self->{'all_lists'};} == 0)
634 0 0 if ($threat eq '*' || $original->{'threatType'} eq $threat and $platform eq '*' || $original->{'platformType'} eq $platform and $threatEntry eq '*' || $original->{'threatEntryType'} eq $threatEntry)
669 0 0 unless exists $info->{'errors'}
673 0 0 $errors > 5 ? :
0 0 $errors == 5 ? :
0 0 $errors == 4 ? :
0 0 $errors == 3 ? :
0 0 $errors == 2 ? :
0 0 $errors == 1 ? :
713 0 0 unless $args{'prefixes'}
733 0 0 unless (defined &first(sub { $_->{'threatEntryType'} eq $info->{'list'}{'threatEntryType'} if $_->{'threatType'} eq $info->{'list'}{'threatType'} and $_->{'platformType'} eq $info->{'list'}{'platformType'}; } , @lists))
738 0 0 if $_->{'threatType'} eq $info->{'list'}{'threatType'} and $_->{'platformType'} eq $info->{'list'}{'platformType'}
768 0 0 if $self->{'logger'}
769 0 0 if $self->{'logger'}
771 0 0 if (not $response->is_success) { }
772 0 0 if $self->{'logger'}
788 0 0 if $self->{'logger'}
813 0 0 if ($data eq '')
818 0 0 if (not exists $info->{'matches'} or scalar @{$info->{'matches'};} == 0)