Branch Coverage

blib/lib/Net/Google/SafeBrowsing2.pm
Criterion Covered Total %
branch 16 202 7.9


line true false branch
224 1 0 unless (exists $$self{'storage'})
228 0 1 if (ref $$self{'list'} ne 'ARRAY')
232 0 1 unless bless $self, $class
287 0 0 if defined $list
298 0 0 if ($$info{'time'} + $$info{'wait'} > time and $force == 0) { }
308 0 0 if (scalar @lists == 0)
318 0 0 if ($mac)
321 0 0 if ($client_key eq '' or $wrapped_key eq '')
331 0 0 if $mac
342 0 0 if ($a_range ne '')
345 0 0 if ($s_range ne '')
346 0 0 if $a_range ne ''
351 0 0 if $mac
360 0 0 if $$self{'debug'}
361 0 0 if $$self{'debug'}
364 0 0 unless ($res->is_success)
385 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 =~ /m:(\S+)$/ and $mac) { }
0 0 elsif ($line =~ /e:pleaserekey/ and $mac) { }
0 0 elsif ($line =~ /r:pleasereset/) { }
434 0 0 unless ($self->validate_data_mac('data', $data, 'key', $client_key, 'digest', $hmac))
457 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'}
482 0 0 if ($mac and not $self->validate_data_mac('data', $data, 'key', $client_key, 'digest', $hmac))
490 0 0 if ($result != 1)
577 0 0 if $list ne ''
598 0 0 if $match ne ''
641 0 0 if (defined $message) { }
678 0 0 if (scalar @add_chunks == 0)
695 0 0 if ($hash eq $full_hash and defined first(sub { $$add_chunk{'list'} eq $_; } , @$lists))
704 0 0 if $found ne ''
706 0 0 if $found ne ''
709 0 0 if $found ne ''
719 0 0 unless defined $hash
723 0 0 if (defined $hash and defined $list)
758 0 0 if (scalar @add_chunks == 0)
766 0 0 if (scalar @full_hashes_prefix == 0)
768 0 0 if scalar @full_hashes == 0
776 0 0 if ($add_chunks[$i]{'prefix'} ne '') { }
779 0 0 if ($add_chunks[$i]{'prefix'} eq $hash_prefix)
788 0 0 if ($found == 0) { }
800 0 0 if (scalar @add_chunks == 0)
814 0 0 if ($$add_chunk{'chunknum'} != $$sub_chunk{'addchunknum'} or $$add_chunk{'list'} ne $$sub_chunk{'list'})
819 0 0 if ($$sub_chunk{'prefix'} eq $$add_chunk{'prefix'}) { }
828 0 0 if (scalar @add_chunks == 0)
864 0 0 if $list ne ''
886 0 0 if scalar @matches > 0
904 0 0 if ($$keys{'client_key'} eq '' or $$keys{'wrapped_key'} eq '')
933 0 0 unless ($res->is_success)
941 0 0 if ($data =~ s/^clientkey:(\d+)://im)
949 0 0 if ($data =~ s/^wrappedkey:(\d+)://im) { }
1002 0 0 unless exists $$info{'errors'}
1006 0 0 $errors > 5 ? :
0 0 $errors == 5 ? :
0 0 $errors == 4 ? :
0 0 $errors == 3 ? :
0 0 $errors == 2 ? :
0 0 $errors == 1 ? :
1034 0 0 if ($$chunk{'host'} eq $suffix and $$chunk{'prefix'} eq $prefix || $$chunk{'prefix'} eq '' and $$chunk{'add_chunknum'} == $chuknum)
1053 0 0 unless (exists $$self{'ua'})
1085 0 0 if ($data =~ /^(\d+):(\d+):(\d+)\n/sig) { }
1098 0 0 if ($type eq 's:') { }
0 0 elsif ($type eq 'a:') { }
1149 0 0 if ($count == 0) { }
1156 0 0 if ($$self{'debug'})
1172 0 0 if ($$self{'debug'})
1206 0 0 if ($count > 0) { }
1213 0 0 if ($$self{'debug'})
1221 0 0 if ($$self{'debug'})
1279 0 0 if $$self{'debug'} > 0
1292 0 0 if $$self{'debug'} > 0 or $$self{'errors'} > 0
1306 0 0 if $$self{'perf'} > 0
1320 0 3 if ($domain =~ /^\d+\.\d+\.\d+\.\d+$/)
1325 2 1 if (scalar @parts >= 3)
1351 0 3 if ($domain =~ /^\d+\.\d+\.\d+\.\d+$/)
1378 1 2 if ($path =~ /\?/)
1443 3 36 if (not $uri->scheme or $uri->scheme eq '')
1465 2 37 if $escape =~ m[^[a-z]+://[^/\?]+$]
1470 3 36 if ((my $domain = 'URI'->new($escape)->host) =~ /^\d+$/)
1514 0 39 if ($exception and $escape =~ m[^[a-z]+://[^/]+/(.+)])
1588 0 0 if (time - $$errors{'timestamp'} < $time) { }
1600 0 0 if (defined $errors and $$errors{'errors'} > 2) { }
1601 0 0 $$errors{'errors'} == 4 ? :
0 0 $$errors{'errors'} == 3 ? :
1621 0 0 if (not $res->is_success) { }
1627 0 0 if (defined $errors and $$errors{'errors'} >= 2 || $$errors{'errors'} == 1 && time - $$errors{'timestamp'} > 300)
1664 0 0 unless ($data =~ /^[a-z-]+:\d+:\d+\n/)
1729 0 0 if scalar @$numbers == 0
1736 0 0 if ($$numbers[$i] != $$numbers[$i - 1] + 1) { }
0 0 elsif ($new_range == 0) { }
1737 0 0 if $i > 1 and $new_range == 1
1747 0 0 if $new_range == 1
1766 0 0 if ($data =~ /^\d+$/) { }
0 0 elsif ($data =~ /^(\d+)-(\d+)$/) { }