Branch Coverage

blib/lib/Net/Google/SafeBrowsing3.pm
Criterion Covered Total %
branch 15 158 9.4


line true false branch
263 1 0 unless (exists $$self{'storage'})
267 0 1 if (ref $$self{'list'} ne 'ARRAY')
271 0 1 unless bless $self, $class
317 0 0 if defined $list
328 0 0 if ($$info{'time'} + $$info{'wait'} > time and $force == 0) { }
338 0 0 if (scalar @lists == 0)
358 0 0 if ($a_range ne '')
361 0 0 if ($s_range ne '')
362 0 0 if $a_range ne ''
375 0 0 if $$self{'debug'}
376 0 0 if $$self{'debug'}
379 0 0 unless ($res->is_success)
405 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/) { }
453 0 0 if scalar @redirections > 0
463 0 0 unless ($res->is_success)
473 0 0 if $$self{'debug'}
474 0 0 if $$self{'debug'}
479 0 0 if ($result != 1)
530 0 0 if $list ne ''
540 0 0 if wantarray
578 0 0 if (scalar @add_chunks == 0)
580 0 0 if wantarray
590 0 0 if (scalar @hashes > 0)
594 0 0 if wantarray
608 0 0 unless defined $hash
612 0 0 if (defined $hash and defined $list)
617 0 0 if wantarray
627 0 0 if wantarray
649 0 0 if (scalar @full_hashes_prefix == 0)
650 0 0 if scalar @full_hashes == 0
662 0 0 if (scalar @add_chunks == 0)
679 0 0 if ($$add_chunk{'chunknum'} != $$sub_chunk{'addchunknum'} or $$add_chunk{'list'} ne $$sub_chunk{'list'})
684 0 0 if ($$sub_chunk{'prefix'} eq $$add_chunk{'prefix'}) { }
693 0 0 if (scalar @add_chunks == 0)
713 0 0 unless exists $$info{'errors'}
717 0 0 $errors > 5 ? :
0 0 $errors == 5 ? :
0 0 $errors == 4 ? :
0 0 $errors == 3 ? :
0 0 $errors == 2 ? :
0 0 $errors == 1 ? :
739 0 0 unless (exists $$self{'ua'})
773 0 0 if (not exists $$data{'chunk_type'} or $$data{'chunk_type'} == 0) { }
814 0 0 if $$self{'debug'}
817 0 0 if $prefix_type == 1
851 0 0 if $prefix_type == 1
901 0 0 if $$self{'debug'} > 0
914 0 0 if $$self{'debug'} > 0 or $$self{'errors'} > 0
928 0 0 if $$self{'perf'} > 0
954 1 10 if ($domain =~ /^\d+\.\d+\.\d+\.\d+$/)
982 1 3 if ($path =~ /\?/)
989 0 4 if (scalar @parts > 4)
1056 3 37 if (not $uri->scheme or $uri->scheme eq '')
1078 2 38 if $escape =~ m[^[a-z]+://[^/\?]+$]
1083 3 37 if ((my $domain = 'URI'->new($escape)->host) =~ /^\d+$/)
1127 0 40 if ($exception and $escape =~ m[^[a-z]+://[^/]+/(.+)])
1189 0 0 if (time - $$errors{'timestamp'} < $time) { }
1201 0 0 if (defined $errors and $$errors{'errors'} > 2) { }
1202 0 0 $$errors{'errors'} == 4 ? :
0 0 $$errors{'errors'} == 3 ? :
1222 0 0 if (not $res->is_success) { }
1228 0 0 if (defined $errors and $$errors{'errors'} >= 2 || $$errors{'errors'} == 1 && time - $$errors{'timestamp'} > 300)
1270 0 0 if ($data =~ s/^(\d+)\n//) { }
1279 0 0 unless ($data =~ /^[a-z-]+:\d+:\d+(:m)?\n/)
1296 0 0 if ($data =~ s/:m$//)
1309 0 0 if ($metadata)
1346 0 0 if scalar @$numbers == 0
1353 0 0 if ($$numbers[$i] != $$numbers[$i - 1] + 1) { }
0 0 elsif ($new_range == 0) { }
1354 0 0 if $i > 1 and $new_range == 1
1364 0 0 if $new_range == 1
1383 0 0 if ($data =~ /^\d+$/) { }
0 0 elsif ($data =~ /^(\d+)-(\d+)$/) { }