line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#! perl |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
6104
|
use strict; |
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
301
|
|
4
|
8
|
|
|
8
|
|
118
|
use warnings; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
384
|
|
5
|
8
|
|
|
8
|
|
1645
|
use utf8; |
|
8
|
|
|
|
|
22
|
|
|
8
|
|
|
|
|
42
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package Music::ChordBot::Opus::Base; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Music::ChordBot::Opus::Base - Base class for ChordBot classes. |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=cut |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = 0.01; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Accessor for data. |
18
|
|
|
|
|
|
|
|
19
|
811
|
|
|
811
|
0
|
3806
|
sub data { $_[0]->{data} } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Generic set/get routine. Without a value, it returns the current |
22
|
|
|
|
|
|
|
# value. With a value it sets the attribute and returns $self so it |
23
|
|
|
|
|
|
|
# can be chained. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _setget { |
26
|
902
|
|
|
902
|
|
1306
|
my ( $self, $key, $value ) = @_; |
27
|
902
|
100
|
|
|
|
1656
|
return $self->{data}->{$key} unless defined $value; |
28
|
898
|
|
|
|
|
1596
|
$self->{data}->{$key} = $value; |
29
|
898
|
|
|
|
|
2087
|
return $self; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |