Branch Coverage

blib/lib/Net/Google/SafeBrowsing3.pm
Criterion Covered Total %
branch 15 154 9.7


line true false branch
269 1 0 unless (exists $self->{'storage'})
273 0 1 if (ref $self->{'list'} ne 'ARRAY')
277 0 1 unless bless $self, $class
323 0 0 if defined $list
334 0 0 if ($info->{'time'} + $info->{'wait'} > time and $force == 0) { }
344 0 0 if (scalar @lists == 0)
364 0 0 if ($a_range ne '')
367 0 0 if ($s_range ne '')
368 0 0 if $a_range ne ''
383 0 0 unless ($res->is_success)
409 0 0 if ($line =~ /n:\s*(\d+)\s*$/) { }
0 0 elsif ($line =~ /i:\s*(\S+)\s*$/) { }
0 0 elsif ($line =~ /u:\s*(\S+),(\S+)\s*$/) { }
0 0 elsif ($line =~ /u:\s*(\S+)\s*$/) { }
0 0 elsif ($line =~ /ad:(\S+)$/) { }
0 0 elsif ($line =~ /sd:(\S+)$/) { }
0 0 elsif ($line =~ /r:pleasereset/) { }
458 0 0 if scalar @redirections > 0
468 0 0 unless ($res->is_success)
478 0 0 if $self->{'debug'}
479 0 0 if $self->{'debug'}
484 0 0 if ($result != 1)
535 0 0 if $list ne ''
545 0 0 if wantarray
583 0 0 if (scalar @add_chunks == 0)
585 0 0 if wantarray
599 0 0 if (scalar @hashes > 0)
603 0 0 if wantarray
617 0 0 unless defined $hash
621 0 0 if (defined $hash and defined $list)
626 0 0 if wantarray
636 0 0 if wantarray
658 0 0 if (scalar @full_hashes_prefix == 0)
659 0 0 if scalar @full_hashes == 0
671 0 0 if (scalar @add_chunks == 0)
688 0 0 if ($add_chunk->{'chunknum'} != $sub_chunk->{'addchunknum'} or $add_chunk->{'list'} ne $sub_chunk->{'list'})
693 0 0 if ($sub_chunk->{'prefix'} eq $add_chunk->{'prefix'}) { }
702 0 0 if (scalar @add_chunks == 0)
722 0 0 unless exists $info->{'errors'}
726 0 0 $errors > 5 ? :
0 0 $errors == 5 ? :
0 0 $errors == 4 ? :
0 0 $errors == 3 ? :
0 0 $errors == 2 ? :
0 0 $errors == 1 ? :
748 0 0 unless (exists $self->{'ua'})
782 0 0 if (not exists $data->{'chunk_type'} or $data->{'chunk_type'} == 0) { }
823 0 0 if $self->{'debug'}
826 0 0 if $prefix_type == 1
860 0 0 if $prefix_type == 1
910 0 0 if $self->{'debug'} > 0
923 0 0 if $self->{'debug'} > 0 or $self->{'errors'} > 0
937 0 0 if $self->{'perf'} > 0
963 1 10 if ($domain =~ /^\d+\.\d+\.\d+\.\d+$/)
991 1 3 if ($path =~ /\?/)
998 0 4 if (scalar @parts > 4)
1065 3 37 if (not $uri->scheme or $uri->scheme eq '')
1087 2 38 if $escape =~ m[^[a-z]+://[^/\?]+$]
1092 3 37 if ((my $domain = 'URI'->new($escape)->host) =~ /^\d+$/)
1136 0 40 if ($exception and $escape =~ m[^[a-z]+://[^/]+/(.+)])
1198 0 0 if (time - $errors->{'timestamp'} < $time) { }
1210 0 0 if (defined $errors and $errors->{'errors'} > 2) { }
1212 0 0 $errors->{'errors'} == 4 ? :
0 0 $errors->{'errors'} == 3 ? :
1231 0 0 if (not $res->is_success) { }
1237 0 0 if (defined $errors and $errors->{'errors'} >= 2 || $errors->{'errors'} == 1 && time - $errors->{'timestamp'} > 300)
1279 0 0 if ($data =~ s/^(\d+)\n//) { }
1288 0 0 unless ($data =~ /^[a-z-]+:\d+:\d+(:m)?\n/gi)
1305 0 0 if ($data =~ s/:m[\r\n]//)
1318 0 0 if ($metadata)
1355 0 0 if scalar @$numbers == 0
1362 0 0 if ($numbers->[$i] != $$numbers[$i - 1] + 1) { }
0 0 elsif ($new_range == 0) { }
1363 0 0 if $i > 1 and $new_range == 1
1373 0 0 if $new_range == 1
1392 0 0 if ($data =~ /^\d+$/) { }
0 0 elsif ($data =~ /^(\d+)-(\d+)$/) { }