| 1 | #! perl | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | 91 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 91 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | 91 | ▶ | use utf8; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | 91 | ▶ | use Carp; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | 91 | ▶ | use FindBin; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | 91 | ▶ | use lib "$FindBin::Bin/../lib"; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | 91 | ▶ | use lib "$FindBin::Bin/../lib/ChordPro/lib"; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||
| 12 | 91 | binmode STDOUT => ':utf8'; | |||||||||||||||||||||||||||||||||||||||||
| 13 | 91 | binmode STDERR => ':utf8'; | |||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||
| 15 | package ChordPro::Testing; | ||||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||
| 17 | 91 | ▶ | use parent 'Exporter'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 18 | 91 | our @EXPORT = qw( $config ); | |||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||
| 20 | 91 | ▶ | use Test::More (); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 21 | 91 | ▶ | use Test::More::UTF8; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||
| 23 | 91 | ▶ | use ChordPro::Files; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 24 | 91 | ▶ | use ChordPro::Config; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 25 | 91 | ▶ | use ChordPro::Paths; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 26 | 91 | ▶ | use ChordPro::Chords; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||
| 28 | 91 | ▶ | sub import { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
import: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 29 | 91 | my $pkg = shift; | |||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||
| 31 | # This is dirty... | ||||||||||||||||||||||||||||||||||||||||||
| 32 | 91 | ▶ | -d "t" && chdir "t"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||
| 34 | 91 | $::running_under_test = 1; | |||||||||||||||||||||||||||||||||||||||||
| 35 | 91 | Test::More->export_to_level(1); | |||||||||||||||||||||||||||||||||||||||||
| 36 | 91 | $pkg->export_to_level( 1, undef, @EXPORT ); | |||||||||||||||||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||
| 39 | 138 | ▶ | sub is_deeply { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_deeply: called CC=12 SCAR=24.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 40 | 138 | my ( $got, $expect, $tag ) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||
| 42 | 138 | ▶ | if ( ref($got) eq 'HASH' && ref($expect) eq 'HASH' ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
ref $got eq "HASH" and ref $expect eq "HASH"
MC/DC50%1/2
ref $got eq "HASH" and ref $expect eq "HASH"
ref $got eq "HASH"
ref $expect eq "HASH"
Truth table66%2/3
A and B
A= ref $got eq "HASH"B= ref $expect eq "HASH"
| |||||||||||||||||||||||||||||||||||||||||||
| 43 | 107 | ▶ | fixchords($got) if $got->{body}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||
| 45 | 107 | for ( qw( config generate ) ) { | |||||||||||||||||||||||||||||||||||||||||
| 46 | 214 | ▶ | delete $got->{$_} unless exists $expect->{$_}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 47 | } | ||||||||||||||||||||||||||||||||||||||||||
| 48 | 107 | ▶ | if ( $got->{chordsinfo} ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 49 | 89 | ▶ | if ( !%{$got->{chordsinfo}} && !$expect->{chordsinfo} ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
%{$got->{'chordsinfo'};} || $expect->{'chordsinfo'}
MC/DC100%2/2
%{$got->{'chordsinfo'};} || $expect->{'chordsinfo'}
%{$got->{'chordsinfo'};}
$expect->{'chordsinfo'}
Truth table100%3/3
A || B
A= %{$got->{'chordsinfo'};}B= $expect->{'chordsinfo'}
| |||||||||||||||||||||||||||||||||||||||||||
| 50 | 51 | delete $got->{chordsinfo}; | |||||||||||||||||||||||||||||||||||||||||
| 51 | } | ||||||||||||||||||||||||||||||||||||||||||
| 52 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 53 | 38 | foreach ( keys %{ $got->{chordsinfo} } ) { | |||||||||||||||||||||||||||||||||||||||||
| 54 | 104 | $got->{chordsinfo}{$_} = $got->{chordsinfo}{$_}->name; | |||||||||||||||||||||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||||||||||||||||||||||
| 56 | } | ||||||||||||||||||||||||||||||||||||||||||
| 57 | } | ||||||||||||||||||||||||||||||||||||||||||
| 58 | 107 | for ( qw( instrument user _key key_actual key_sound key_print | |||||||||||||||||||||||||||||||||||||||||
| 59 | chords numchords | ||||||||||||||||||||||||||||||||||||||||||
| 60 | _configversion bookmark | ||||||||||||||||||||||||||||||||||||||||||
| 61 | ) ) { | ||||||||||||||||||||||||||||||||||||||||||
| 62 | 1070 | ▶ | delete $got->{meta}->{$_} unless exists $expect->{meta}->{$_}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 63 | } | ||||||||||||||||||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||
| 66 | 138 | Test::More::is_deeply( $got, $expect, $tag ); | |||||||||||||||||||||||||||||||||||||||||
| 67 | } | ||||||||||||||||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||||||||||||||||
| 69 | 91 | push( @EXPORT, 'is_deeply' ); | |||||||||||||||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||||||||||||||||
| 71 | 91 | ▶ | sub testconfig { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
testconfig: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 72 | # May change later. | ||||||||||||||||||||||||||||||||||||||||||
| 73 | 91 | ChordPro::Config::configurator; | |||||||||||||||||||||||||||||||||||||||||
| 74 | } | ||||||||||||||||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||||||||||||||||
| 76 | 91 | push( @EXPORT, 'testconfig' ); | |||||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||||||
| 78 | 91 | our $config = testconfig(); | |||||||||||||||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||||||||||||||||
| 80 | 91 | ChordPro::Chords::add_config_chord | |||||||||||||||||||||||||||||||||||||||||
| 81 | ( { name => "NC", base => 1, frets => [ (-1)x6 ], fingers => [] } ); | ||||||||||||||||||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||||||||||||||||
| 83 | { | ||||||||||||||||||||||||||||||||||||||||||
| 84 | 91 | ▶ | no warnings 'redefine'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||||||||||||||||
| 86 | 11 | ▶ | sub getresource { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
getresource: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 87 | 11 | CP->findres($_[0]); | |||||||||||||||||||||||||||||||||||||||||
| 88 | } | ||||||||||||||||||||||||||||||||||||||||||
| 89 | } | ||||||||||||||||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||||||||||||||||
| 91 | 91 | push( @EXPORT, 'getresource' ); | |||||||||||||||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||||||||||||||||
| 93 | 0 | ▶ | sub cmp { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
cmp: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 94 | # Perl version of the 'cmp' program. | ||||||||||||||||||||||||||||||||||||||||||
| 95 | # Returns 1 if the files differ, 0 if the contents are equal. | ||||||||||||||||||||||||||||||||||||||||||
| 96 | 0 | my ($old, $new) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 97 | 0 | ▶ | unless ( open (F1, $old) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 98 | 0 | print STDERR ("$old: $!\n"); | |||||||||||||||||||||||||||||||||||||||||
| 99 | 0 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 100 | } | ||||||||||||||||||||||||||||||||||||||||||
| 101 | 0 | ▶ | unless ( open (F2, $new) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 102 | 0 | print STDERR ("$new: $!\n"); | |||||||||||||||||||||||||||||||||||||||||
| 103 | 0 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 104 | } | ||||||||||||||||||||||||||||||||||||||||||
| 105 | 0 | my ($buf1, $buf2); | |||||||||||||||||||||||||||||||||||||||||
| 106 | 0 | my ($len1, $len2); | |||||||||||||||||||||||||||||||||||||||||
| 107 | 0 | while ( 1 ) { | |||||||||||||||||||||||||||||||||||||||||
| 108 | 0 | $len1 = sysread (F1, $buf1, 10240); | |||||||||||||||||||||||||||||||||||||||||
| 109 | 0 | $len2 = sysread (F2, $buf2, 10240); | |||||||||||||||||||||||||||||||||||||||||
| 110 | 0 | ▶ | return 0 if $len1 == $len2 && $len1 == 0; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$len1 == $len2 and $len1 == 0
MC/DC0%0/2
$len1 == $len2 and $len1 == 0
$len1 == $len2
$len1 == 0
Truth table0%0/3
A and B
A= $len1 == $len2B= $len1 == 0
| |||||||||||||||||||||||||||||||||||||||||||
| 111 | 0 | ▶ | return 1 if $len1 != $len2 || ( $len1 && $buf1 ne $buf2 ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$len1 != $len2 or $len1 and $buf1 ne $buf2
$len1 and $buf1 ne $buf2
MC/DC0%0/3
$len1 != $len2 or $len1 and $buf1 ne $buf2
$len1 != $len2
$len1
$buf1 ne $buf2
Truth table0%0/4
A or B and C
A= $len1 != $len2B= $len1C= $buf1 ne $buf2
| |||||||||||||||||||||||||||||||||||||||||||
| 112 | } | ||||||||||||||||||||||||||||||||||||||||||
| 113 | } | ||||||||||||||||||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||||||||||||||||
| 115 | 84 | ▶ | sub differ { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
differ: called CC=11 SCAR=27.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 116 | 84 | my ($file1, $file2) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 117 | 84 | ▶ | $file2 = "$file1" unless $file2; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 118 | 84 | $file1 = "$file1"; | |||||||||||||||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||||||||||||||||
| 120 | 84 | my @lines1 = @{ fs_load( $file1, { fail => 'hard' } ) }; | |||||||||||||||||||||||||||||||||||||||||
| 121 | 84 | my @lines2 = @{ fs_load( $file2, { fail => 'hard' } ) }; | |||||||||||||||||||||||||||||||||||||||||
| 122 | 84 | ▶ | my $linesm = @lines1 > @lines2 ? @lines1 : @lines2; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 123 | 84 | my $todo = ""; | |||||||||||||||||||||||||||||||||||||||||
| 124 | 84 | ▶ | if ( @lines1 > 0 && @lines2 > 0 ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
@lines1 > 0 and @lines2 > 0
MC/DC0%0/2
@lines1 > 0 and @lines2 > 0
@lines1 > 0
@lines2 > 0
Truth table33%1/3
A and B
A= @lines1 > 0B= @lines2 > 0
| |||||||||||||||||||||||||||||||||||||||||||
| 125 | 84 | ▶ | $todo = "TODO " if $lines1[0] =~ /\bTODO\b/; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 126 | } | ||||||||||||||||||||||||||||||||||||||||||
| 127 | 84 | ▶ | for ( my $line = 0; $line < $linesm; $line++ ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 128 | 2537 | ▶ | next if $lines1[$line] eq $lines2[$line]; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 129 | 1 | Test::More::diag("${todo}Files $file1 and $file2 differ at line ", 1+$line); | |||||||||||||||||||||||||||||||||||||||||
| 130 | 1 | Test::More::diag(" < $lines1[$line]"); | |||||||||||||||||||||||||||||||||||||||||
| 131 | 1 | Test::More::diag(" > $lines2[$line]"); | |||||||||||||||||||||||||||||||||||||||||
| 132 | 1 | return !$todo; | |||||||||||||||||||||||||||||||||||||||||
| 133 | } | ||||||||||||||||||||||||||||||||||||||||||
| 134 | 83 | ▶ | return 0 if @lines1 == @lines2; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 135 | 0 | $linesm++; | |||||||||||||||||||||||||||||||||||||||||
| 136 | 0 | Test::More::diag("${todo}Files $file1 and $file2 differ at line ", 1+$linesm); | |||||||||||||||||||||||||||||||||||||||||
| 137 | 0 | ▶ | Test::More::diag(" < ", $lines1[$linesm] // "***missing***"); | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$lines1[$linesm] // "***missing***"
MC/DC0%0/1
$lines1[$linesm] // "***missing***"
$lines1[$linesm]
Truth table0%0/2
A
A= $lines1[$linesm]
| |||||||||||||||||||||||||||||||||||||||||||
| 138 | 0 | ▶ | Test::More::diag(" > ", $lines2[$linesm] // "***missing***"); | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$lines2[$linesm] // "***missing***"
MC/DC0%0/1
$lines2[$linesm] // "***missing***"
$lines2[$linesm]
Truth table0%0/2
A
A= $lines2[$linesm]
| |||||||||||||||||||||||||||||||||||||||||||
| 139 | 0 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 140 | } | ||||||||||||||||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||||||||||||||||
| 142 | 91 | push( @EXPORT, 'differ' ); | |||||||||||||||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||||||||||||||||
| 144 | 44 | ▶ | sub fixchords { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
fixchords: called CC=17 SCAR=28.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 145 | 44 | my ( $s ) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 146 | 44 | ▶ | for ( @{ $s->{body} // [] } ) { | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$s->{"body"} // []
MC/DC0%0/1
$s->{"body"} // []
$s->{"body"}
Truth table50%1/2
A
A= $s->{"body"}
| |||||||||||||||||||||||||||||||||||||||||||
| 147 | 226 | ▶ | for ( @{ $_->{chords} // [] } ) { | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$_->{"chords"} // []
MC/DC100%1/1
$_->{"chords"} // []
$_->{"chords"}
Truth table100%2/2
A
A= $_->{"chords"}
| |||||||||||||||||||||||||||||||||||||||||||
| 148 | 191 | ▶ | $_ = $_->key if UNIVERSAL::can( $_, "key" ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 149 | } | ||||||||||||||||||||||||||||||||||||||||||
| 150 | 226 | ▶ | for ( @{ $_->{chorus} // [] } ) { | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$_->{"chorus"} // []
MC/DC100%1/1
$_->{"chorus"} // []
$_->{"chorus"}
Truth table100%2/2
A
A= $_->{"chorus"}
| |||||||||||||||||||||||||||||||||||||||||||
| 151 | 28 | ▶ | for ( @{ $_->{chords} // [] } ) { | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$_->{"chords"} // []
MC/DC100%1/1
$_->{"chords"} // []
$_->{"chords"}
Truth table100%2/2
A
A= $_->{"chords"}
| |||||||||||||||||||||||||||||||||||||||||||
| 152 | 47 | ▶ | $_ = $_->key if UNIVERSAL::can( $_, "key" ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 153 | } | ||||||||||||||||||||||||||||||||||||||||||
| 154 | } | ||||||||||||||||||||||||||||||||||||||||||
| 155 | 226 | ▶ | for ( @{ $_->{tokens} // [] } ) { | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$_->{"tokens"} // []
MC/DC100%1/1
$_->{"tokens"} // []
$_->{"tokens"}
Truth table100%2/2
A
A= $_->{"tokens"}
| |||||||||||||||||||||||||||||||||||||||||||
| 156 | 136 | ▶ | if ( $_->{class} eq "chord" ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 157 | 31 | for ( $_->{chord} ) { | |||||||||||||||||||||||||||||||||||||||||
| 158 | 31 | $_ = $_->key; | |||||||||||||||||||||||||||||||||||||||||
| 159 | } | ||||||||||||||||||||||||||||||||||||||||||
| 160 | } | ||||||||||||||||||||||||||||||||||||||||||
| 161 | elsif ( $_->{class} eq "chords" ) { | ||||||||||||||||||||||||||||||||||||||||||
| 162 | 1 | for ( @{ $_->{chords} } ) { | |||||||||||||||||||||||||||||||||||||||||
| 163 | 2 | $_ = $_->key; | |||||||||||||||||||||||||||||||||||||||||
| 164 | } | ||||||||||||||||||||||||||||||||||||||||||
| 165 | } | ||||||||||||||||||||||||||||||||||||||||||
| 166 | } | ||||||||||||||||||||||||||||||||||||||||||
| 167 | } | ||||||||||||||||||||||||||||||||||||||||||
| 168 | } | ||||||||||||||||||||||||||||||||||||||||||
| 169 | |||||||||||||||||||||||||||||||||||||||||||
| 170 | 91 | push( @EXPORT, 'fixchords' ); | |||||||||||||||||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||||||||||||||||
| 172 | 91 | 1; | |||||||||||||||||||||||||||||||||||||||||