Branch Coverage

blib/lib/MIME/Detect.pm
Criterion Covered Total %
branch 39 54 72.2


line true false branch
42 1 5 exists $args->{$_} ? :
104 3 0 unless (exists $options{'xml'})
107 3 0 if ($options{'xml'} and not ref $options{'xml'})
109 0 3 unless (eval "require $options{'xml'}; 1")
116 0 1 ref $_ ? :
3 1 ref $_ eq 'SCALAR' ? :
153 1413 1313 if ($s)
154 1413 0 if (my $sc = $m->{$s}) { }
170 1413 1313 if $superclass
177 1481 1245 if ($magic)
179 0 1481 unless defined $priority
205 714 2792 @and ? :
229 1 2 unless (ref $file)
230 0 1 unless open my $fh, "<", $file
246 2726 0 ref $k ? :
247 6 2720 if ($t->matches($buffer))
293 2724 0 ref $k ? :
294 4 2720 if ($t->valid_extension($file))
339 156 4896 unless CORE::length $self->buffer
345 361 2232 if ($offset =~ /^(\d+):(\d+)$/u)
353 739 1854 if ($offset < $self->offset or $self->offset + $self->length < $offset + $length)
358 739 0 if (ref $fh eq 'GLOB') { }
359 739 0 if (seek $fh, $offset, 0)
365 0 0 if ($fh->seek($offset, 0))
372 739 0 if ($updated)
378 2017 576 if ($offset >= $self->offset and $self->offset + $self->length >= $offset + $length) { }
576 0 elsif ($offset >= $self->offset) { }