Branch Coverage

blib/lib/File/BOM.pm
Criterion Covered Total %
branch 69 76 90.7


line true false branch
270 72 48 if (defined $fh) { }
280 9 111 unless open $fh, '<', $filename
283 38 73 if (wantarray) { }
290 95 16 if ($enc)
293 9 86 if $spill
296 96 15 if ($mode)
297 1 95 unless binmode $fh, $mode
302 38 72 wantarray ? :
327 90 12 if ($enc)
329 8 82 if $spill
332 30 72 wantarray ? :
358 3 216 unless defined $string
364 204 12 if (defined $enc) { }
372 144 72 wantarray ? :
401 234 69 if (seek $fh, 0, 0) { }
67 2 elsif (wantarray) { }
411 156 145 wantarray ? :
450 3 236 if $@
454 2 234 unless seek $fh, $off, 0
469 3 403 if $@
476 96 307 if (@possible == 1 and my $enc = $bom2enc{$so_far}) { }
43 264 elsif (@possible == 0) { }
484 29 14 if (my $enc = $bom2enc{$so_far}) { }
490 0 29 if $@
511 6 3 if not $status and $!
542 434 90 if (my($found) = $bom =~ /$bom_re/)
555 3 31 if ($enc eq 'UTF-8') { }
30 1 elsif ($enc =~ /^UTF-(16|32)/) { }
556 1 2 if (($byte & 128) == 0) { }
638 0 28 unless bless {'offset', 0}, $_[0]
643 28 0 if ($] >= 5.008007) { }
655 15 13 if (not defined $self->{'enc'}) { }
658 14 1 if ($self->{'enc'} ne '')
660 0 14 if $spill
677 13 8 if (tell $fh == 0 and not $self->{'wrote_bom'})
696 2 0 if ($whence == 0)
700 2 0 if (seek $fh, $pos, $whence) { }
713 0 1 if ($pos == -1) { }