line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#! perl |
2
|
|
|
|
|
|
|
|
3
|
79
|
|
|
79
|
|
1260
|
use v5.26; |
|
79
|
|
|
|
|
294
|
|
4
|
79
|
|
|
79
|
|
50169
|
use Object::Pad; |
|
79
|
|
|
|
|
892723
|
|
|
79
|
|
|
|
|
397
|
|
5
|
79
|
|
|
79
|
|
9486
|
use utf8; |
|
79
|
|
|
|
|
235
|
|
|
79
|
|
|
|
|
549
|
|
6
|
79
|
|
|
79
|
|
2632
|
use Carp; |
|
79
|
|
|
|
|
250
|
|
|
79
|
|
|
|
|
10403
|
|
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
|
3334
|
field $format :mutator :param = undef; |
|
1394
|
|
|
|
|
5890
|
|
33
|
58
|
|
|
58
|
0
|
187
|
field $info :mutator :param = undef; |
|
58
|
|
|
|
|
264
|
|
34
|
1833
|
|
|
1833
|
0
|
4020
|
field $orig :mutator :param = undef; |
|
1833
|
|
|
|
|
5323
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# For convenience. |
37
|
659
|
|
|
659
|
0
|
2244
|
method chord_display { |
|
0
|
|
|
0
|
0
|
0
|
|
|
0
|
|
|
|
|
0
|
|
38
|
|
|
|
|
|
|
|
39
|
659
|
50
|
33
|
|
|
3737
|
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
|
|
|
|
|
1915
|
local $info->{chordformat} = $format; |
51
|
659
|
|
|
|
|
2042
|
$info->chord_display; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
16
|
|
|
16
|
0
|
34
|
method raw { |
55
|
16
|
50
|
|
|
|
52
|
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; |