Branch Coverage

blib/lib/Audio/FLAC/Header.pm
Criterion Covered Total %
branch 61 116 52.5


line true false branch
69 0 7 unless open my $fh, $file
84 0 7 if ($byteCount <= 0)
93 0 7 unless ($self->_getMetadataBlocks($fh))
119 4 10 unless $key
130 3 2 unless $key
140 2 0 if exists $$self{'cuesheet'}
150 0 0 if exists $$self{'seektable'}
161 1 0 if exists $$self{'application'}{$appID}
170 0 0 unless defined $type
172 0 0 if ($type eq 'all')
173 0 0 if exists $$self{'allpictures'}
182 0 0 if exists $$self{'picture'}{$_}
223 1 0 unless (/^VENDOR$/)
247 0 1 if ($idxVorbis >= 0) { }
255 1 0 if ($idxPadding >= 0) { }
265 0 1 if ($totalAvail - length($vorbisComment) < 0)
273 1 0 if ($idxVorbis < 0) { }
283 0 1 if ($idxPadding < 0) { }
299 2 1 if ($$block{'blockType'} == $BT_PADDING)
301 1 1 if (my $next = splice(@{$$self{'metadataBlocks'};}, $i + 1, 1))
321 0 1 unless open FLACFILE, "+<$$self{'filename'}"
337 0 7 unless read $fh, my $buffer, 4
339 1 6 if (substr($buffer, 0, 3) eq $ID3HEADERFLAG)
347 0 1 unless read $fh, $buffer, 2
353 0 4 unless read $fh, $buffer, 1
358 0 1 unless read $fh, $buffer, 4
361 0 7 if ($buffer ne $FLACHEADERFLAG)
382 0 28 unless read $fh, $buffer, 4
392 0 28 unless $metadataBlockLength
395 0 28 unless read $fh, my $metadataBlockData, $metadataBlockLength
448 0 7 if ($totalSeconds == 0)
494 32 0 if ($tagStr =~ /^(.*?)=(.*?)[\r\n]*$/s)
500 0 32 if (exists $$tags{$tkey} and ref $$tags{$tkey} ne 'ARRAY') { }
0 32 elsif (ref $$tags{$tkey} eq 'ARRAY') { }
537 0 2 if length $catalog > 0
555 0 2 if ($isCD and length $catalog != 13 and length $catalog != 0)
560 0 2 if (not $isCD and $leadin > 0)
569 0 2 if ($reserved != 0)
580 0 2 if ($numTracks < 1 or $isCD and $numTracks > 100)
596 0 16 if ($isCD and $trackOffset % 588)
607 0 16 if ($isCD and $tracknum > 99 and $tracknum != 170)
612 0 16 if (defined $seenTracknumber{$tracknum})
622 0 16 if (length $isrc != 0 and length $isrc != 12)
635 0 16 if ($reserved != 0)
646 2 14 if ($i == $numTracks)
649 0 2 if ($isCD and $tracknum != 170)
659 14 0 $isAudio ? :
662 0 14 if $preemphasis
663 0 14 if $isrc
665 0 14 if ($numIndexes < 1 or $isCD and $numIndexes > 100)
677 0 26 if ($isCD and $indexOffset % 588)
688 0 26 if ($reserved != 0)
696 0 26 unless defined $timeoffset
767 0 0 if $sampleNumber == 18446744073709551615
809 0 26 if ($samplerate == 0)
816 2 24 if ($totalSeconds == 0)
854 1 3 if ($$self{'metadataBlocks'}[$idx]{'blockType'} == $htype)
863 1 1 if $found == 0