Branch Coverage

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


line true false branch
267 1 0 unless (exists $self->{'storage'})
271 0 1 if (ref $self->{'list'} ne 'ARRAY')
275 0 1 unless bless $self, $class
321 0 0 if defined $list
332 0 0 if ($info->{'time'} + $info->{'wait'} > time and $force == 0) { }
342 0 0 if (scalar @lists == 0)
362 0 0 if ($a_range ne '')
365 0 0 if ($s_range ne '')
366 0 0 if $a_range ne ''
381 0 0 unless ($res->is_success)
407 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/) { }
456 0 0 if scalar @redirections > 0
466 0 0 unless ($res->is_success)
476 0 0 if $self->{'debug'}
477 0 0 if $self->{'debug'}
482 0 0 if ($result != 1)
533 0 0 if $list ne ''
543 0 0 if wantarray
581 0 0 if (scalar @add_chunks == 0)
583 0 0 if wantarray
597 0 0 if (scalar @hashes > 0)
601 0 0 if wantarray
615 0 0 unless defined $hash
619 0 0 if (defined $hash and defined $list)
624 0 0 if wantarray
634 0 0 if wantarray
656 0 0 if (scalar @full_hashes_prefix == 0)
657 0 0 if scalar @full_hashes == 0
669 0 0 if (scalar @add_chunks == 0)
686 0 0 if ($add_chunk->{'chunknum'} != $sub_chunk->{'addchunknum'} or $add_chunk->{'list'} ne $sub_chunk->{'list'})
691 0 0 if ($sub_chunk->{'prefix'} eq $add_chunk->{'prefix'}) { }
700 0 0 if (scalar @add_chunks == 0)
720 0 0 unless exists $info->{'errors'}
724 0 0 $errors > 5 ? :
0 0 $errors == 5 ? :
0 0 $errors == 4 ? :
0 0 $errors == 3 ? :
0 0 $errors == 2 ? :
0 0 $errors == 1 ? :
746 0 0 unless (exists $self->{'ua'})
780 0 0 if (not exists $data->{'chunk_type'} or $data->{'chunk_type'} == 0) { }
821 0 0 if $self->{'debug'}
824 0 0 if $prefix_type == 1
858 0 0 if $prefix_type == 1
908 0 0 if $self->{'debug'} > 0
921 0 0 if $self->{'debug'} > 0 or $self->{'errors'} > 0
935 0 0 if $self->{'perf'} > 0
961 1 10 if ($domain =~ /^\d+\.\d+\.\d+\.\d+$/)
989 1 3 if ($path =~ /\?/)
996 0 4 if (scalar @parts > 4)
1063 3 37 if (not $uri->scheme or $uri->scheme eq '')
1085 2 38 if $escape =~ m[^[a-z]+://[^/\?]+$]
1090 3 37 if ((my $domain = 'URI'->new($escape)->host) =~ /^\d+$/)
1134 0 40 if ($exception and $escape =~ m[^[a-z]+://[^/]+/(.+)])
1196 0 0 if (time - $errors->{'timestamp'} < $time) { }
1208 0 0 if (defined $errors and $errors->{'errors'} > 2) { }
1210 0 0 $errors->{'errors'} == 4 ? :
0 0 $errors->{'errors'} == 3 ? :
1229 0 0 if (not $res->is_success) { }
1235 0 0 if (defined $errors and $errors->{'errors'} >= 2 || $errors->{'errors'} == 1 && time - $errors->{'timestamp'} > 300)
1277 0 0 if ($data =~ s/^(\d+)\n//) { }
1286 0 0 unless ($data =~ /^[a-z-]+:\d+:\d+(:m)?\n/gi)
1303 0 0 if ($data =~ s/:m[\r\n]//)
1316 0 0 if ($metadata)
1353 0 0 if scalar @$numbers == 0
1360 0 0 if ($numbers->[$i] != $$numbers[$i - 1] + 1) { }
0 0 elsif ($new_range == 0) { }
1361 0 0 if $i > 1 and $new_range == 1
1371 0 0 if $new_range == 1
1390 0 0 if ($data =~ /^\d+$/) { }
0 0 elsif ($data =~ /^(\d+)-(\d+)$/) { }