line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::Discogs::Label; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
33
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
194
|
|
4
|
6
|
|
|
6
|
|
30
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
139
|
|
5
|
6
|
|
|
6
|
|
26
|
use NEXT; |
|
6
|
|
|
|
|
39
|
|
|
6
|
|
|
|
|
152
|
|
6
|
6
|
|
|
6
|
|
34
|
use base qw( WWW::Discogs::HasMedia ); |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
440
|
|
7
|
6
|
|
|
6
|
|
30
|
use Carp; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
2334
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
1
|
|
|
1
|
0
|
5
|
my ($class, @args) = @_; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
|
|
3
|
my $self = {}; |
13
|
1
|
|
|
|
|
2
|
bless $self, $class; |
14
|
1
|
|
|
|
|
18
|
$self->EVERY::LAST::_init(@args); |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
|
|
16
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _init { |
20
|
1
|
|
|
1
|
|
10
|
my ($self, %args) = @_; |
21
|
|
|
|
|
|
|
|
22
|
1
|
|
50
|
|
|
4
|
$self->{_name} = $args{name} || ''; |
23
|
1
|
|
50
|
|
|
8
|
$self->{_contactinfo} = $args{contactinfo} || ''; |
24
|
1
|
|
50
|
|
|
4
|
$self->{_parentLabel} = $args{parentLabel} || ''; |
25
|
1
|
|
50
|
|
|
5
|
$self->{_releases} = $args{releases} || []; |
26
|
1
|
|
50
|
|
|
4
|
$self->{_sublabels} = $args{sublabels} || []; |
27
|
1
|
|
50
|
|
|
4
|
$self->{_params} = $args{_params} || {}; |
28
|
1
|
|
50
|
|
|
6
|
$self->{_uri} = $args{_uri} || ''; |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
4
|
return $self; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub name { |
34
|
1
|
|
|
1
|
0
|
3
|
my $self = shift; |
35
|
1
|
|
|
|
|
6
|
return $self->{_name}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub releases { |
39
|
1
|
|
|
1
|
0
|
5388
|
my $self = shift; |
40
|
1
|
50
|
|
|
|
8
|
unless ($self->{_params}->{releases}) { |
41
|
0
|
|
|
|
|
0
|
carp "No releases fetched for label '" . $self->{_name} . |
42
|
|
|
|
|
|
|
"'. Call 'label' method with releases => 1 param." |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
1
|
|
|
|
|
2
|
return @{ $self->{_releases} }; |
|
1
|
|
|
|
|
17
|
|
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub contactinfo { |
49
|
1
|
|
|
1
|
0
|
1285
|
my $self = shift; |
50
|
1
|
|
|
|
|
17
|
return $self->{_contactinfo}; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub sublabels { |
54
|
1
|
|
|
1
|
0
|
3
|
my $self = shift; |
55
|
1
|
|
|
|
|
2
|
return @{ $self->{_sublabels} }; |
|
1
|
|
|
|
|
5
|
|
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub parentlabel { |
59
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
60
|
1
|
|
|
|
|
9
|
return $self->{_parentLabel}; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |