Branch Coverage

blib/lib/Minecraft/NBTReader.pm
Criterion Covered Total %
branch 60 90 66.6


line true false branch
24 2 0 if ($Minecraft::NBTReader::Config{'byteorder'} =~ /^1/u) { }
44 1 1 if ($filetype eq 'gzip') { }
0 1 elsif ($filetype eq 'unknown') { }
1 0 elsif ($filetype eq 'plain') { }
53 0 2 unless open my $ifh, '<', $newfname
60 1 1 if ($filename ne $newfname)
70 0 3 unless open my $ifh, '<', $filename
72 0 3 unless read $ifh, $buf, 1
76 2 1 if ($type == 10) { }
1 0 elsif ($type == 31) { }
92 0 1 if (not -f $newfname or $self->checkFileType($newfname) ne 'plain')
104 0 31 unless read $fh, $buf, 1
106 7 24 if ($type == 0) { }
16 8 elsif ($type >= 1 and $type <= 6 or $type == 8) { }
1 7 elsif ($type == 7) { }
2 5 elsif ($type == 9) { }
5 0 elsif ($type == 10) { }
127 0 2 unless read $fh, $buf, 1
132 5 2 if ($listtype >= 1 and $listtype <= 6 or $listtype == 8) { }
2 0 elsif ($listtype == 10) { }
177 0 24 unless ($len)
182 0 24 unless read $fh, $name, $len
189 6 24 unless (defined $allowzerolength)
194 0 30 unless read $fh, $buf, 2
197 30 0 if ($$self{'needswap'}) { }
203 0 6 unless $allowzerolength or $len
211 1 20 if ($type == 1) { }
1 19 elsif ($type == 2) { }
1 18 elsif ($type == 3) { }
8 10 elsif ($type == 4) { }
3 7 elsif ($type == 5) { }
1 6 elsif ($type == 6) { }
6 0 elsif ($type == 8) { }
234 0 1001 unless read $fh, $buf, 1
245 0 1 unless read $fh, $buf, 2
248 1 0 if ($$self{'needswap'}) { }
261 0 4 unless read $fh, $buf, 4
264 4 0 if ($$self{'needswap'}) { }
277 0 8 unless read $fh, $buf, 8
280 8 0 if ($$self{'needswap'}) { }
293 0 3 unless read $fh, $buf, 4
296 3 0 if ($$self{'needswap'}) { }
309 0 1 unless read $fh, $buf, 8
312 1 0 if ($$self{'needswap'}) { }
327 0 6 unless read $fh, $val, $len