Branch Coverage

blib/lib/ChordPro/Chords.pm
Criterion Covered Total %
branch 58 154 37.6


line true false branch
32 0 197 unless @tuning
60 0 0 if $a0 != $b0
61 0 0 if $arest =~ /^m(?:in)?(?!aj)/u
62 0 0 if $brest =~ /^m(?:in)?(?!aj)/u
69 0 0 unless $a0 <=> $b0
77 0 0 if ($hdr)
95 0 0 if (eval { do { $chord->{'name'} } }) { }
0 0 elsif ($origin eq 'chord') { }
105 0 0 unless $info
113 0 0 $_ < 0 ? :
114 0 0 $origin eq 'chord' ? :
0 0 @{$info->{'frets'} // [];} ? :
118 0 0 $_ < 0 ? :
120 0 0 if $info->{'fingers'} and @{$info->{'fingers'};}
124 0 0 if $info->{'keys'} and @{$info->{'keys'};}
136 0 0 $mode && $mode == 2 ? :
159 0 0 if $maxl < $t
165 0 0 if (eval { do { $chord->{'name'} } }) { }
171 0 0 unless $info
177 0 0 if (@{$info->{'frets'};})
182 0 0 if ($info->{'fingers'} and @{$info->{'fingers'};})
187 0 0 if ($info->{'keys'} and @{$info->{'keys'};})
198 0 0 if ($main::config->{'pdf'}{'diagrams'}{'vcells'})
221 0 197 unless ref $t eq "ARRAY"
224 118 79 if (@tuning) { }
227 0 118 if ($t1 ne $t2)
229 0 0 if $main::options->{'verbose'} > 1
254 7 0 unless ref $p and $p->isa("ChordPro::Chords::Parser")
258 0 7 if $main::options->{'verbose'} > 1
279 197 0 unless ref $p and $p->isa("ChordPro::Chords::Parser")
286 0 197 unless @parsers
294 1132 1185 if (ref($name) =~ /^ChordPro::Chord::/u)
299 1837 480 if $ret
300 232 248 unless $info
304 18 230 unless $name
306 9 221 if ($ret)
312 18 63 unless defined $info->{$_}
323 0 49881 if ($frets and @$frets and @$frets != strings())
326 0 31043 if ($fingers and @$fingers and @$fingers != strings())
329 0 49883 unless ($base > 0 and $base < 24)
332 8 49875 if ($keys and @$keys)
334 0 24 unless /^\d+$/u and $_ < 24
351 0 49821 if ($def->{'name'} =~ /.\|./u)
354 1 49820 if (UNIVERSAL::isa($def->{'name'}, 'ARRAY')) { }
363 30940 18881 if ($def->{'copy'} or $def->{'copyall'})
365 0 30940 if ($def->{'copyall'})
366 0 0 if $src
371 0 30940 unless $res
373 30940 0 if ($def->{'copy'}) { }
386 0 49821 if $res
389 0 49821 if ($def->{'display'})
391 0 0 if ($dpinfo) { }
399 0 49822 if $name =~ /^(\||\s*)$/u
403 19873 18445 if ($info->is_chord and $def->{'copy'} and $def->is_chord)
414 0 49822 unless $parser->{'target'}
425 49822 0 $frets && @$frets ? :
0 49822 $fingers && @$fingers ? :
0 49822 $keys && @$keys ? :
431 38318 11504 if ($info->is_chord) { }
437 0 11504 if ($i and $i->is_chord)
444 38318 11504 if ($info->is_chord)
456 0 62 if $ii->name =~ /^(\||\s*)$/u
459 0 62 if $res
473 60 2 unless defined $c->{$_}
476 103 83 unless $c->{$_} and @{$c->{$_};}
506 0 0 if %song_chords
564 0 0 if $info->{'keys'} and @{$info->{'keys'};}
570 0 0 if defined $info->{'qual_canon'} and defined $info->{'ext_canon'} and defined $keys{$info->{'qual_canon'} . $info->{'ext_canon'}}
573 0 0 unless $info->{'frets'} and @{$info->{'frets'};}
578 0 0 if $base < 0
581 0 0 if $_ < 0
583 0 0 if ($info->{'root_ord'})
584 0 0 if $c < $info->{'root_ord'}
597 0 123 unless $xpose or $xcode
598 0 123 if $c =~ /^ .+/u
600 0 123 unless ($info)
609 0 0 $xpose ? :