| lib/ChordPro/Chords/Parser.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 78 | 155 | 50.3 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 222 | 63870 | 0 | 0 | $chord eq "" and $bass ne "" |
| 0 | 23954 | 25 | $self->{'c_rpat'} and $main::config->{'settings'}{'chordnames'} eq "relaxed" | |
| 23954 | 3 | 22 | $self->{'c_rpat'} and $main::config->{'settings'}{'chordnames'} eq "relaxed" and $chord =~ /^$self->{'c_rpat'}$/u | |
| 23951 | 0 | 6 | $main::config->{'settings'}{'notenames'} and ucfirst($chord) =~ /^$self->{'n_pat'}$/u | |
| 308 | 0 | 0 | 0 | $info->{'name_canon'} ne $t and $main::config->{'debug'}{'chords'} |
| 549 | 2 | 0 | 0 | $main::options->{'verbose'} and $main::options->{'verbose'} > 1 |
| 662 | 2 | 0 | 0 | $main::options->{'verbose'} and $main::options->{'verbose'} > 1 |
| 785 | 0 | 1846 | 8 | defined $self->kbkeys and not @{$self->kbkeys;} |
| 817 | 6657 | 0 | 0 | $self->{'parens'} and $self->{'name'} =~ /^\(.*\)$/u |
| 840 | 242 | 296 | 3171 | $_[0]{'keys'} and @{$_[0]{'keys'};} |
| 852 | 775 | 0 | 0 | not $main::config->{'settings'}{'enharmonic-transpose'} and $args->{'key'} |
| 854 | 0 | 0 | 0 | $args->{'root'} eq "F" and $args->{'key'} eq "F#" |
| 856 | 0 | 0 | 0 | $args->{'root'} eq "B" and $args->{'key'} eq "Gb" |
| 924 | 0 | 0 | 0 | ref $self->{$_} eq "ARRAY" and @{$self->{$_};} |
| 968 | 512 | 0 | 3 | $self->{'bass'} and $self->{'bass'} ne "" |
| 1006 | 369 | 0 | 3 | $self->{'bass'} and $self->{'bass'} ne "" |
| 369 | 0 | 3 | $self->{'bass'} and $self->{'bass'} ne "" and not $self->{'bass'} =~ /^\d+$/u | |
| 1030 | 10 | 6 | 4 | $key_ord and $p->movable |
| 1040 | 14 | 6 | 0 | $p->{'system'} eq "roman" and $info->{'qual_canon'} eq "-" |
| 1044 | 20 | 0 | 0 | $self->{'bass'} and $self->{'bass'} ne "" |
| 1045 | 0 | 0 | 0 | $key_ord and $p->movable |
| 1081 | 0 | 0 | 0 | $self->{'bass'} and $self->{'bass'} ne "" |
| 1108 | 0 | 0 | 0 | $self->{'bass'} and $self->{'bass'} ne "" |
| line | l | !l | condition |
|---|---|---|---|
| 69 | 2 | 0 | $main::config // {} |
| 2 | 0 | $init // {} | |
| 249 | 39913 | 6 | $plus{'qual'} // "" |
| 257 | 39913 | 6 | $plus{'ext'} // "" |
| 448 | 309 | 0 | $main::config // {} |
| 309 | 0 | $init // {} | |
| 579 | 306 | 102 | $+{'qual'} // "" |
| 587 | 408 | 0 | $+{'ext'} // "" |
| 691 | 476 | 136 | $+{'qual'} // "" |
| 699 | 612 | 0 | $+{'ext'} // "" |
| 787 | 1636 | 210 | $self->frets // [] |
| 802 | 0 | 0 | $self->kbkeys // [] |
| 803 | 814 | 0 | $self->frets // [] |
| 1063 | 0 | 0 | ($main::config->{'chord-formats'}{'common'} // $main::config->{'settings'}{'chord-format'}) // "%{name}" |
| 1091 | 4 | 0 | $main::config->{'chord-formats'}{'nashville'} // "%{name}" |
| 1118 | 4 | 0 | $main::config->{'chord-formats'}{'roman'} // "%{name}" |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 93 | 11515 | 0 | 0 | $parsers{'common'} //= "ChordPro::Chords::Parser::Common"->new({%{$main::config;}, "notes", {"system", "common", "sharp", ["C", ["C#", "Cis", "C\x{266f}"], "D", ["D#", "Dis", "D\x{266f}"], "E", "F", ["F#", "Fis", "F\x{266f}"], "G", ["G#", "Gis", "G\x{266f}"], "A", ["A#", "Ais", "A\x{266f}"], "B"], "flat", ["C", ["Db", "Des", "D\x{266d}"], "D", ["Eb", "Es", "Ees", "E\x{266d}"], "E", "F", ["Gb", "Ges", "G\x{266d}"], "G", ["Ab", "As", "Aes", "A\x{266d}"], "A", ["Bb", "Bes", "B\x{266d}"], "B"]}}) |
| 132 | 455 | 128 | 0 | $system //= $main::config->{'notes'}{'system'} |
| 136 | 0 | 2 | 0 | $parsers{$system} //= "ChordPro::Chords::Parser::Nashville"->new |
| 140 | 0 | 2 | 0 | $parsers{$system} //= "ChordPro::Chords::Parser::Roman"->new |
| 158 | 0 | 0 | 0 | $parsers{'common'} //= $self->default |
| 251 | 7791 | 0 | 32128 | $q eq "m" or $q eq "mi" |
| 7791 | 2074 | 30054 | $q eq "m" or $q eq "mi" or $q eq "min" | |
| 769 | 1980 | 11605 | 0 | ref $pkg || $pkg |
| 796 | 1383 | 0 | 0 | defined $_[0]{'root'} or defined $_[0]{'bass'} |
| 818 | 0 | 6657 | 0 | $np or not $self->{'parens'} |
| 850 | 0 | 775 | 0 | $self->{'display'} // $self |
| 870 | 22 | 0 | 753 | $main::config->{'settings'}{'truesf'} or $main::config->{'settings'}{'maj7delta'} |
| 876 | 10 | 8 | 17548 | $k eq "orig" or $k eq "xc" |
| 18 | 69 | 17479 | $k eq "orig" or $k eq "xc" or $k eq "xp" | |
| 977 | 0 | 6 | 38595 | $self->is_rootless or $self->is_note |
| 983 | 9 | 22179 | 16407 | $self->{'bass_ord'} // () |
| 989 | 372 | 0 | 0 | $dir //= $xpose <=> 0 |
| 1063 | 767 | 0 | 0 | $main::config->{'chord-formats'}{'common'} // $main::config->{'settings'}{'chord-format'} |