Branch Coverage

blib/lib/Image/ExifTool/ID3.pm
Criterion Covered Total %
branch 90 312 28.8


line true false branch
869 0 0 unless $val =~ /^\[(\d+\.\d+)\]/g
873 0 0 if ($h) { }
882 0 0 if ($ss >= 60)
884 0 0 if ++$m >= 60
898 0 0 unless length $$dataPt > 6
902 0 0 if not $lang =~ /^[a-z]{3}$/ or $lang eq "eng"
905 0 0 if ($enc == 1 or $enc == 2) { }
906 0 0 unless $$dataPt =~ /\G(..)*?\0\0/gs
910 0 0 unless $$dataPt =~ /\0/g
918 0 0 if $lang
922 0 0 if $lang
926 0 0 unless $$dataPt =~ /$pat/gs
931 0 0 if ($timeCode == 2) { }
935 0 0 if $timeCode != 1
950 0 0 if ($$dataPt =~ /^(.*?)\0/s) { }
957 0 0 unless ($tagTablePtr->{$tag})
959 0 0 unless $tag =~ /^[-\w]{1,24}$/
960 0 0 unless ($tagTablePtr->{$tag})
971 0 0 if $key
984 0 1 unless $genre{$1}
989 0 0 unless $genre{$1}
1015 0 35 unless length $val
1016 27 8 unless (defined $enc)
1021 35 0 if ($enc == 0 or $enc == 3) { }
0 0 elsif ($enc == 1 or $enc == 2) { }
1026 0 41 $enc ? :
1034 0 0 if ($val =~ s/((..)*?)\0\0//s) { }
1037 0 0 unless length $val > 1
1041 0 0 if $v =~ s/^(\xfe\xff|\xff\xfe)//
1048 8 27 if wantarray
1059 0 3 if $val & 2155905152
1084 40 0 if ($vers < 768) { }
1086 3 37 if $offset + 6 > $size
1088 0 37 if $id eq "\0\0\0"
1093 0 0 if $offset + 10 > $size
1095 0 0 if $id eq "\0\0\0\0"
1103 0 0 if (not defined $len or $offset + $len + 10 > $size)
1109 0 0 if $tagTablePtr->{$nextID}
1111 0 0 if $offset + $oldLen + 10 > $size
1113 0 0 if $tagTablePtr->{$nextID}
1117 0 37 if $offset + $len > $size
1119 0 37 unless ($tagInfo)
1121 0 0 if $otherTable
1122 0 0 if ($tagInfo) { }
1125 0 0 unless $verbose or $et->Options("Unknown")
1127 0 0 unless length $id
1128 0 0 unless ($tagTablePtr->{$id})
1136 0 37 if ($flags)
1137 0 0 if ($vers < 1024) { }
1139 0 0 if $flags & 128
1140 0 0 if $flags & 64
1141 0 0 if $flags & 32
1144 0 0 if $flags & 64
1145 0 0 if $flags & 8
1146 0 0 if $flags & 4
1147 0 0 if $flags & 2
1148 0 0 if $flags & 1
1151 0 37 if ($flags{'Encrypt'})
1159 0 37 if $flags{'Unsync'}
1162 0 37 if ($flags{'GroupID'})
1163 0 0 unless length $val >= 1
1168 0 37 if ($flags{'DataLen'} or $flags{'Compress'})
1169 0 0 unless length $val >= 4
1174 0 37 if ($flags{'Compress'})
1175 0 0 if (eval { do { require Compress::Zlib } }) { }
1178 0 0 if $inflate
1179 0 0 if ($inflate and $stat == Compress::Zlib::Z_STREAM_END()) { }
1191 0 37 if (defined $dataLen)
1193 0 0 unless defined $dataLen
1194 0 0 unless $dataLen == length $val
1196 0 37 unless ($tagInfo)
1197 0 0 unless $verbose
1198 0 0 if %flags
1216 0 37 if ($id =~ /^(TXX|TXXX)$/) { }
27 10 elsif ($id =~ /^T/ or $id =~ /^(IPL|IPLS)$/) { }
0 10 elsif ($id =~ /^(WXX|WXXX)$/) { }
0 10 elsif ($id =~ /^W/) { }
6 4 elsif ($id =~ /^(COM|COMM|ULT|USLT)$/) { }
0 4 elsif ($id eq 'USER') { }
0 4 elsif ($id =~ /^(CNT|PCNT)$/) { }
2 2 elsif ($id =~ /^(PIC|APIC)$/) { }
0 2 elsif ($id eq 'POP' or $id eq 'POPM') { }
0 2 elsif ($id eq 'OWNE') { }
2 0 elsif ($id eq 'RVA' or $id eq 'RVAD') { }
0 0 elsif ($id eq 'RVA2') { }
0 0 elsif ($id eq 'PRIV') { }
0 0 elsif ($tagInfo->{'Format'} or $tagInfo->{'SubDirectory'}) { }
0 0 elsif ($id eq 'GRP1' or $id eq 'MVNM' or $id eq 'MVIN') { }
0 0 elsif (not $tagInfo->{'Binary'}) { }
1219 0 0 unless defined $vals[$_]
1227 0 0 if ($enc == 1 or $enc == 2) { }
1232 0 0 unless (defined $val and defined $url)
1238 0 0 length $val ? :
1242 0 6 unless $valLen > 4
1245 0 12 unless defined $vals[$_]
1246 0 6 length $vals[0] ? :
1248 0 0 unless $valLen > 4
1252 0 0 unless $valLen >= 4
1257 0 2 unless $valLen >= 4
1260 0 2 if ($enc == 1 or $enc == 2) { }
1261 0 0 $id eq 'PIC' ? :
1263 2 0 $id eq 'PIC' ? :
1266 0 2 unless $val =~ s/^$hdr//s
1278 0 0 unless (defined $dat and length $dat)
1289 0 0 if $strs[1]
1294 0 2 unless my $bits = shift @dat
1302 2 4 if scalar @dat < $j + $bytes
1304 2 2 if $val
1310 0 4 unless $flag & $elem->[3]
1314 0 0 $val =~ /^([^\0]*)\0/s ? :
1337 0 0 if $id
1352 0 6 if ($lang and $lang =~ /^[a-z]{3}$/i and $lang ne "eng")
1355 0 37 if %flags
1377 0 16 if $et->{'DoneID3'}
1389 0 16 unless $raf->Read($buff, 3) == 3
1395 0 3 unless $raf->Read($hBuff, 7) == 7
1398 0 3 unless defined $size
1400 0 3 if ($vers >= 1280)
1404 0 3 unless ($raf->Read($hBuff, $size) == $size)
1409 0 3 if ($flags & 128 and $vers < 1024)
1414 0 3 if ($flags & 64)
1416 0 0 unless $size >= 4
1418 0 0 if ($len > length $hBuff)
1425 0 3 if ($flags & 16)
1438 0 3 if ($vers >= 1024) { }
0 3 elsif ($vers >= 768) { }
1452 2 6 if ($raf->Seek(-128, 2) and $raf->Read($tBuff, 128) == 128 and $tBuff =~ /^TAG/)
1464 0 2 if ($raf->Seek(-$trailSize - $eSize, 2) and $raf->Read($eBuff, $eSize) == $eSize and $eBuff =~ /^TAG+/)
1473 0 11 if ($raf->Seek(-$trailSize - 15, 2) and $raf->Read($buff, 15) == 15 and $buff =~ /^(.{6})LYRICS(END|200)$/)
1475 0 0 $ver eq 'END' ? :
1477 0 0 if $len > $raf->Tell
1478 0 0 if ($raf->Seek(-$len, 1) and $raf->Read($buff, $len) == $len and $buff =~ /LYRICSBEGIN/g) { }
1483 0 0 if ($et->Options("Verbose"))
1486 0 0 if ($pos > 11)
1492 0 0 if ($ver eq 'END') { }
1500 0 0 unless $buff =~ /\G(.{3})(\d{5})/g
1503 0 0 if $pos + $size > length $buff
1504 0 0 unless ($tbl->{$tag})
1511 0 0 unless $pos == length($buff) - 15
1521 3 13 if ($rtnVal)
1523 2 1 if ($dirInfo->{'RAF'})
1535 0 2 unless require "Image/ExifTool/$module.pm"
1539 2 0 if &$func($et, $dirInfo)
1549 3 0 if (%id3Header)
1554 2 1 if (%id3Trailer)
1560 0 2 if ($id3Trailer{'EnhancedTAG'})
1596 9 1 unless ($et->{'DoneID3'})
1601 9 1 unless ($rtnVal)
1609 1 8 $et->{'FILE_EXT'} && $et->{'FILE_EXT'} eq 'MP3' ? :
1610 9 0 if ($raf->Read($buff, $scanLen))
1612 0 9 if ($buff =~ /\0\0\x01(\xb3|\xc0)/) { }
1615 0 0 if $raf->Read($buf2, 65536 - $scanLen)
1616 0 0 if Image::ExifTool::MPEG::ParseMPEGAudioVideo($et, \$buff)
1621 0 9 $ext eq 'MUS' ? :
1622 1 8 if Image::ExifTool::MPEG::ParseMPEGAudio($et, \$buff, $mp3)
1628 1 9 if ($rtnVal and not $et->{'DoneAPE'})