line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Photo.pm 7370 2012-04-09 01:17:33Z chris $ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
WebService::IMDB::Photo |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=cut |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package WebService::IMDB::Photo; |
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
64
|
|
12
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
79
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
2
|
|
11
|
use base qw(Class::Accessor); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
236
|
|
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
2
|
|
11
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
151
|
|
19
|
|
|
|
|
|
|
our @CARP_NOT = qw(WebService::IMDB WebService::IMDB::Name WebService::IMDB::Title); |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
2
|
|
10
|
use WebService::IMDB::Image; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
12
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw( |
24
|
|
|
|
|
|
|
caption |
25
|
|
|
|
|
|
|
copyright |
26
|
|
|
|
|
|
|
image |
27
|
|
|
|
|
|
|
)); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 METHODS |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head2 caption |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head2 copyright |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head2 image |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub _new { |
41
|
459
|
|
|
459
|
|
3771
|
my $class = shift; |
42
|
459
|
|
|
|
|
513
|
my $ws = shift; |
43
|
459
|
50
|
|
|
|
998
|
my $data = shift or die; |
44
|
|
|
|
|
|
|
|
45
|
459
|
|
|
|
|
660
|
my $self = {}; |
46
|
|
|
|
|
|
|
|
47
|
459
|
|
|
|
|
929
|
bless $self, $class; |
48
|
|
|
|
|
|
|
|
49
|
459
|
50
|
|
|
|
1187
|
if (exists $data->{'caption'}) { $self->caption($data->{'caption'}); } |
|
459
|
|
|
|
|
1245
|
|
50
|
459
|
100
|
|
|
|
4703
|
if (exists $data->{'copyright'}) { $self->copyright($data->{'copyright'}); } |
|
305
|
|
|
|
|
785
|
|
51
|
459
|
|
|
|
|
3707
|
$self->image(WebService::IMDB::Image->_new($ws, $data->{'image'})); |
52
|
|
|
|
|
|
|
|
53
|
459
|
|
|
|
|
4523
|
return $self; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |