line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#! perl |
2
|
|
|
|
|
|
|
|
3
|
79
|
|
|
79
|
|
1355
|
use v5.26; |
|
79
|
|
|
|
|
313
|
|
4
|
79
|
|
|
79
|
|
51365
|
use Object::Pad; |
|
79
|
|
|
|
|
896794
|
|
|
79
|
|
|
|
|
399
|
|
5
|
79
|
|
|
79
|
|
9402
|
use utf8; |
|
79
|
|
|
|
|
202
|
|
|
79
|
|
|
|
|
519
|
|
6
|
79
|
|
|
79
|
|
3029
|
use Carp; |
|
79
|
|
|
|
|
203
|
|
|
79
|
|
|
|
|
10440
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
class ChordPro::Chords::Appearance :strict(params); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=begin md |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
key The bare chord name, e.g., "Am7". |
13
|
|
|
|
|
|
|
Also index in chordinfo. |
14
|
|
|
|
|
|
|
Transposed/transcoded if applicable. |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
info The chord info (chord props, diagram props, etc.) |
17
|
|
|
|
|
|
|
This should be chordsinfo->{key} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
orig The chord as it appeared in the song, e.g. "(Am7)" |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
format The format for the chord, e.g. "%{root}%{qual}%{ext}", |
22
|
|
|
|
|
|
|
but more likely something like "(%{formatted})". |
23
|
|
|
|
|
|
|
%{formatted} will be replaced by the result of applying the |
24
|
|
|
|
|
|
|
global config.chord-format. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
raw ???? |
27
|
|
|
|
|
|
|
Key with parens if (%{formatted}). |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
field $key :mutator :param = undef; |
32
|
1394
|
|
|
1394
|
0
|
3413
|
field $format :mutator :param = undef; |
|
1394
|
|
|
|
|
5616
|
|
33
|
58
|
|
|
58
|
0
|
191
|
field $info :mutator :param = undef; |
|
58
|
|
|
|
|
278
|
|
34
|
1833
|
|
|
1833
|
0
|
4189
|
field $orig :mutator :param = undef; |
|
1833
|
|
|
|
|
5455
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# For convenience. |
37
|
659
|
|
|
659
|
0
|
2231
|
method chord_display { |
|
0
|
|
|
0
|
0
|
0
|
|
|
0
|
|
|
|
|
0
|
|
38
|
|
|
|
|
|
|
|
39
|
659
|
50
|
33
|
|
|
3732
|
unless ( $info |
40
|
|
|
|
|
|
|
&& UNIVERSAL::isa( $info, 'ChordPro::Chord::Base' ) ) { |
41
|
0
|
|
|
|
|
0
|
$Carp::Internal{ (__PACKAGE__) }++; |
42
|
|
|
|
|
|
|
local $Carp::RefArgFormatter = |
43
|
0
|
|
|
0
|
|
0
|
sub { my $t = $_[0]; |
44
|
0
|
|
|
|
|
0
|
$t =~ s/^(ChordPro::.*)=HASH.*/<<$1>>/; |
45
|
0
|
|
|
|
|
0
|
$t }; |
|
0
|
|
|
|
|
0
|
|
46
|
0
|
|
|
|
|
0
|
my $m = Carp::longmess(); |
47
|
0
|
|
|
|
|
0
|
die("Missing info for $key$m"); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
659
|
|
|
|
|
1967
|
local $info->{chordformat} = $format; |
51
|
659
|
|
|
|
|
2103
|
$info->chord_display; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
16
|
|
|
16
|
0
|
35
|
method raw { |
55
|
16
|
50
|
|
|
|
53
|
return $key unless defined $format; |
56
|
0
|
0
|
|
|
|
|
if ( $format eq '(%{formatted})' ) { |
57
|
0
|
|
|
|
|
|
return '(' . $key . ')'; |
58
|
|
|
|
|
|
|
} |
59
|
0
|
|
|
|
|
|
$key; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
0
|
|
|
0
|
0
|
|
method CARP_TRACE { |
63
|
0
|
|
|
|
|
|
"<>"; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |