line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
=head1 NAME |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
Net::Songkick::Artist - Models an artist in the Songkick API |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=cut |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package Net::Songkick::Artist; |
8
|
|
|
|
|
|
|
|
9
|
6
|
|
|
6
|
|
84082
|
use strict; |
|
6
|
|
|
|
|
23
|
|
|
6
|
|
|
|
|
170
|
|
10
|
6
|
|
|
6
|
|
29
|
use warnings; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
144
|
|
11
|
|
|
|
|
|
|
|
12
|
6
|
|
|
6
|
|
566
|
use Moose::Util::TypeConstraints; |
|
6
|
|
|
|
|
244773
|
|
|
6
|
|
|
|
|
43
|
|
13
|
6
|
|
|
6
|
|
11304
|
use Moose; |
|
6
|
|
|
|
|
143949
|
|
|
6
|
|
|
|
|
35
|
|
14
|
|
|
|
|
|
|
|
15
|
6
|
|
|
6
|
|
38873
|
use Net::Songkick::MusicBrainz; |
|
6
|
|
|
|
|
23
|
|
|
6
|
|
|
|
|
237
|
|
16
|
6
|
|
|
6
|
|
589
|
use Net::Songkick::Types; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
1691
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
coerce 'Net::Songkick::Artist', |
19
|
|
|
|
|
|
|
from 'HashRef', |
20
|
|
|
|
|
|
|
via { Net::Songkick::Artist->new($_) }; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has $_ => ( |
23
|
|
|
|
|
|
|
is => 'ro', |
24
|
|
|
|
|
|
|
isa => 'Str', |
25
|
|
|
|
|
|
|
) for qw[id displayName uri]; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
has identifier => ( |
28
|
|
|
|
|
|
|
is => 'ro', |
29
|
|
|
|
|
|
|
isa => 'ArrayRef[Net::Songkick::MusicBrainz]', |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
has onTourUntil => ( |
33
|
|
|
|
|
|
|
is => 'ro', |
34
|
|
|
|
|
|
|
isa => 'Net::Songkick::DateTime', |
35
|
|
|
|
|
|
|
coerce => 1, |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
around BUILDARGS => sub { |
39
|
|
|
|
|
|
|
my $orig = shift; |
40
|
|
|
|
|
|
|
my $class = shift; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
my %args; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
if (@_ == 1) { |
45
|
|
|
|
|
|
|
%args = %{$_[0]}; |
46
|
|
|
|
|
|
|
} else { |
47
|
|
|
|
|
|
|
%args = @_; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
if (exists $args{identifier}) { |
51
|
|
|
|
|
|
|
foreach (@{$args{identifier}}) { |
52
|
|
|
|
|
|
|
if (ref $_ ne 'Net::Songkick::MusicBrainz') { |
53
|
|
|
|
|
|
|
$_ = Net::Songkick::MusicBrainz->new($_); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
if (exists $args{onTourUntil}) { |
59
|
|
|
|
|
|
|
$args{onTourUntil} = { date => $args{onTourUntil} }; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
$class->$orig(\%args); |
64
|
|
|
|
|
|
|
}; |
65
|
|
|
|
|
|
|
|
66
|
6
|
|
|
6
|
|
48
|
no Moose; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
32
|
|
67
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 AUTHOR |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Dave Cross <dave@perlhacks.com> |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 SEE ALSO |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
perl(1), L<http://www.songkick.com/>, L<http://developer.songkick.com/> |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Copyright (C) 2010, Magnum Solutions Ltd. All Rights Reserved. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This script is free software; you can redistribute it and/or modify it |
82
|
|
|
|
|
|
|
under the same terms as Perl itself. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
1; |