Branch Coverage

blib/lib/MIME/Detect/Type.pm
Criterion Covered Total %
branch 35 38 92.1


line true false branch
72 6 2316 if (defined $e)
149 213 30 if $num =~ /^0x/
160 2006 243 if (ref $rule eq 'HASH' and $rule->{'type'} eq 'string') { }
63 180 elsif (ref $rule eq 'HASH' and $rule->{'type'} eq 'little32') { }
24 156 elsif (ref $rule eq 'HASH' and $rule->{'type'} eq 'little16') { }
96 60 elsif (ref $rule eq 'HASH' and $rule->{'type'} eq 'big32') { }
27 33 elsif (ref $rule eq 'HASH' and $rule->{'type'} eq 'big16') { }
12 21 elsif (ref $rule eq 'HASH' and $rule->{'type'} eq 'host16') { }
9 12 elsif (ref $rule eq 'HASH' and $rule->{'type'} eq 'host32') { }
12 0 elsif (ref $rule eq 'HASH' and $rule->{'type'} eq 'byte') { }
167 759 0 $3 ? :
605 759 $2 ? :
207 1364 $replace{$1} ? :
224 4 1548 unless (ref $buffer)
227 0 4 unless open my $fh, '<', \$_buffer
234 2 1550 if ($self->mime_type eq 'text/plain')
248 227 1272 if ($rule->{'offset'} =~ /^(\d+):(\d+)$/) { }
257 254 1245 if $rule->{'and'}
259 8 1491 if $matches