Branch Coverage

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


line true false branch
197 2 11 unless ($self->{'key'})
198 0 2 if $self->{'logger'}
202 1 10 unless ($self->{'http_agent'})
203 0 1 if $self->{'logger'}
210 1 9 unless ($self->{'storage'})
211 0 1 if $self->{'logger'}
215 0 9 if (ref $self->{'lists'} ne 'ARRAY')
265 0 0 if ($time > &Net::Google::SafeBrowsing4::time() and $force == 0) { }
266 0 0 if $self->{'logger'}
270 0 0 if $self->{'logger'}
290 0 0 if $self->{'logger'}
291 0 0 if $self->{'logger'}
293 0 0 unless ($response->is_success)
294 0 0 if $self->{'logger'}
323 0 0 if (scalar @hex > 0)
324 0 0 if $result >= 0
337 0 0 $list->{'responseType'} eq 'FULL_UPDATE' ? :
340 0 0 if ($check ne $list->{'checksum'}{'sha256'}) { }
341 0 0 if $self->{'logger'}
353 0 0 if $self->{'logger'}
363 0 0 if ($wait =~ /(\d+)(\.\d+)?s/i)
407 0 6 if $self->{'logger'}
408 0 6 if $self->{'logger'}
410 1 5 unless ($response->is_success)
419 3 2 if ($@ or ref $info ne 'HASH')
424 1 1 unless (exists $info->{'threatLists'})
482 0 0 unless ($args{'url'})
486 0 0 if (ref $args{'url'} eq '') { }
0 0 elsif (ref $args{'url'} ne 'ARRAY') { }
489 0 0 if $self->{'logger'}
492 0 0 if $self->{'logger'}
497 0 0 if $self->{'perf'}
501 0 0 unless ($gsb_uri)
502 0 0 if $self->{'logger'}
514 0 0 if $self->{'perf'} and $self->{'logger'}
517 0 0 if $self->{'perf'}
519 0 0 if $self->{'logger'}
521 0 0 if (scalar @matched_prefixes == 0)
522 0 0 if $self->{'logger'}
528 0 0 if $self->{'logger'}
533 0 0 if $lookup_hashes->{$_} eq ''
534 0 0 if $self->{'perf'} and $self->{'logger'}
538 0 0 if $self->{'perf'}
539 0 0 if $self->{'logger'}
544 0 0 if (scalar @hash_matches > 0)
552 0 0 if $urls->{$_}{'parent'} eq $urls->{$found_hash}{'parent'}
556 0 0 if $self->{'logger'}
557 0 0 if $self->{'perf'} and $self->{'logger'}
561 0 0 if $self->{'perf'}
563 0 0 if (scalar keys %needed_prefixes > 0)
566 0 0 if $self->{'perf'} and $self->{'logger'}
570 0 0 if scalar @matches > 0
571 0 0 if $self->{'perf'} and $self->{'logger'}
575 0 0 if $self->{'perf'} and $self->{'logger'}
603 0 0 unless $args{'lists'} or $self->{'lists'}
605 0 0 if (scalar @lists == 0)
606 0 0 if (scalar @{$self->{'all_lists'};} == 0)
608 0 0 if (scalar @$lists == 0)
619 0 0 unless ($list =~ m[^[*_A-Z]+/[*_A-Z]+/[*_A-Z]+$])
620 0 0 if $self->{'logger'}
623 0 0 if ($list =~ /\*/) { }
0 0 elsif ($list =~ m[^([_A-Z]+)/([_A-Z]+)/([_A-Z]+)$]) { }
626 0 0 if (scalar @{$self->{'all_lists'};} == 0)
631 0 0 if ($threat eq '*' || $original->{'threatType'} eq $threat and $platform eq '*' || $original->{'platformType'} eq $platform and $threatEntry eq '*' || $original->{'threatEntryType'} eq $threatEntry)
666 0 0 unless exists $info->{'errors'}
670 0 0 $errors > 5 ? :
0 0 $errors == 5 ? :
0 0 $errors == 4 ? :
0 0 $errors == 3 ? :
0 0 $errors == 2 ? :
0 0 $errors == 1 ? :
710 0 0 unless $args{'prefixes'}
730 0 0 unless (defined &first(sub { $_->{'threatEntryType'} eq $info->{'list'}{'threatEntryType'} if $_->{'threatType'} eq $info->{'list'}{'threatType'} and $_->{'platformType'} eq $info->{'list'}{'platformType'}; } , @lists))
735 0 0 if $_->{'threatType'} eq $info->{'list'}{'threatType'} and $_->{'platformType'} eq $info->{'list'}{'platformType'}
765 0 0 if $self->{'logger'}
766 0 0 if $self->{'logger'}
768 0 0 if (not $response->is_success) { }
769 0 0 if $self->{'logger'}
785 0 0 if $self->{'logger'}
810 0 0 if ($data eq '')
815 0 0 if (not exists $info->{'matches'} or scalar @{$info->{'matches'};} == 0)