Branch Coverage

lib/ChordPro/Chords.pm
Criterion Covered Total %
branch 60 166 36.1


line true false branch
34 0 199 unless @tuning
62 0 0 if $a0 != $b0
63 0 0 if $arest =~ /^m(?:in)?(?!aj)/u
64 0 0 if $brest =~ /^m(?:in)?(?!aj)/u
71 0 0 unless $a0 <=> $b0
79 0 0 if ($hdr)
97 0 0 if (eval { do { $chord->{'name'} } }) { }
0 0 elsif ($origin eq 'chord') { }
107 0 0 unless $info
115 0 0 $_ < 0 ? :
116 0 0 $origin eq 'chord' ? :
0 0 @{$info->{'frets'} // [];} ? :
120 0 0 $_ < 0 ? :
122 0 0 if $info->{'fingers'} and @{$info->{'fingers'};}
126 0 0 if $info->{'keys'} and @{$info->{'keys'};}
138 0 0 $mode && $mode == 2 ? :
161 0 0 if $maxl < $t
167 0 0 if (eval { do { $chord->{'name'} } }) { }
173 0 0 unless $info
179 0 0 if (@{$info->{'frets'};})
184 0 0 if ($info->{'fingers'} and @{$info->{'fingers'};})
189 0 0 if ($info->{'keys'} and @{$info->{'keys'};})
200 0 0 if ($main::config->{'pdf'}{'diagrams'}{'vcells'})
223 0 199 unless ref $t eq "ARRAY"
226 118 81 if (@tuning) { }
229 0 118 if ($t1 ne $t2)
231 0 0 if $main::options->{'verbose'} > 1
246 0 1194 unless /(^.*?)(\d+)$/u
249 0 1194 unless defined $n
268 7 0 unless ref $p and $p->isa("ChordPro::Chords::Parser")
272 0 7 if $main::options->{'verbose'} > 1
293 199 0 unless ref $p and $p->isa("ChordPro::Chords::Parser")
300 0 199 unless @parsers
308 1132 1185 if (ref($name) =~ /^ChordPro::Chord::/u)
313 1837 480 if $ret
314 232 248 unless $info
318 18 230 unless $name
320 9 221 if ($ret)
327 18 99 unless defined $info->{$_}
338 0 49883 if ($frets and @$frets and @$frets != strings())
341 0 31045 if ($fingers and @$fingers and @$fingers != strings())
344 0 49885 unless ($base > 0 and $base < 24)
347 8 49877 if ($keys and @$keys)
349 0 24 unless /^\d+$/u and $_ < 24
366 0 49823 if ($def->{'name'} =~ /.\|./u)
369 1 49822 if (UNIVERSAL::isa($def->{'name'}, 'ARRAY')) { }
378 30940 18883 if ($def->{'copy'} or $def->{'copyall'})
380 0 30940 if ($def->{'copyall'})
381 0 0 if $src
386 0 30940 unless $res
388 30940 0 if ($def->{'copy'}) { }
401 0 49823 if $res
404 0 49823 if ($def->{'display'})
406 0 0 if ($dpinfo) { }
414 0 49824 if $name =~ /^(\||\s*)$/u
418 19873 18445 if ($info->is_chord and $def->{'copy'} and $def->is_chord)
429 0 49824 unless $parser->{'target'}
440 49824 0 $frets && @$frets ? :
0 49824 $fingers && @$fingers ? :
0 49824 $keys && @$keys ? :
446 38318 11506 if ($info->is_chord) { }
452 0 11506 if ($i and $i->is_chord)
459 38318 11506 if ($info->is_chord)
471 0 62 if $ii->name =~ /^(\||\s*)$/u
474 0 62 if $res
488 60 2 unless defined $c->{$_}
491 103 83 unless $c->{$_} and @{$c->{$_};}
521 0 0 if %song_chords
579 0 0 if $info->{'keys'} and @{$info->{'keys'};}
583 0 0 if (defined $info->{'qual_canon'} and defined $info->{'ext_canon'} and defined $keys{$info->{'qual_canon'} . $info->{'ext_canon'}}) { }
591 0 0 unless $info->{'frets'} and @{$info->{'frets'};}
599 0 0 if $base < 0
602 0 0 if $_ < 0
604 0 0 if ($info->{'root_ord'})
605 0 0 if $c < $info->{'root_ord'}
613 0 0 if (defined $info->{'bass'} and $info->{'bass'} ne "")
618 0 0 if $bass < 0
620 0 0 if $_ == $bass
621 0 0 $_ < $bass ? :
634 0 123 unless $xpose or $xcode
635 0 123 if $c =~ /^ .+/u
637 0 123 unless ($info)
646 0 0 $xpose ? :