Branch Coverage

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


line true false branch
43 1 5 exists $args->{$_} ? :
105 3 0 unless (exists $options{'xml'})
109 3 0 if ($options{'xml'} and not ref $options{'xml'})
111 0 3 unless (eval "require $options{'xml'}; 1")
118 0 1 ref $_ ? :
3 1 ref $_ eq 'SCALAR' ? :
155 1128 1193 if ($s)
156 1128 0 if (my $sc = $m->{$s}) { }
172 1128 1193 if $superclass
179 1241 1080 if ($magic)
181 0 1241 unless defined $priority
206 636 2375 @and ? :
230 1 1 unless (ref $file)
231 0 1 unless open my $fh, '<', $file
247 1548 0 ref $k ? :
248 5 1543 if ($t->matches($buffer))
294 2319 0 ref $k ? :
295 4 2315 if ($t->valid_extension($file))
341 94 2831 unless CORE::length $self->buffer
347 227 1276 if ($offset =~ /^(\d+):(\d+)$/)
355 477 1026 if ($offset < $self->offset or $self->offset + $self->length < $offset + $length)
360 477 0 if (ref $fh eq 'GLOB') { }
361 477 0 if (seek $fh, $offset, 0)
367 0 0 if ($fh->seek($offset, 0))
374 477 0 if ($updated)
380 1116 387 if ($offset >= $self->offset and $self->offset + $self->length >= $offset + $length) { }
387 0 elsif ($offset >= $self->offset) { }