line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: DatePlace.pm 7370 2012-04-09 01:17:33Z chris $ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
WebService::IMDB::DatePlace |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=cut |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package WebService::IMDB::DatePlace; |
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
68
|
|
12
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
81
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
2
|
|
10
|
use base qw(Class::Accessor); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
157
|
|
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
2
|
|
9
|
use Carp; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
171
|
|
19
|
|
|
|
|
|
|
our @CARP_NOT = qw(WebService::IMDB WebService::IMDB::Name WebService::IMDB::Birth WebService::IMDB::Death); |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
2
|
|
1187
|
use WebService::IMDB::Date; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
314
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw( |
24
|
|
|
|
|
|
|
date |
25
|
|
|
|
|
|
|
place |
26
|
|
|
|
|
|
|
)); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 METHODS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head2 date |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head2 place |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub _new { |
38
|
2
|
|
|
2
|
|
7
|
my $class = shift; |
39
|
2
|
|
|
|
|
6
|
my $ws = shift; |
40
|
2
|
50
|
|
|
|
10
|
my $data = shift or die; |
41
|
|
|
|
|
|
|
|
42
|
2
|
|
|
|
|
6
|
my $self = {}; |
43
|
|
|
|
|
|
|
|
44
|
2
|
|
|
|
|
8
|
bless $self, $class; |
45
|
|
|
|
|
|
|
|
46
|
2
|
50
|
|
|
|
26
|
if (exists $data->{'date'}) { $self->date(WebService::IMDB::Date->_new($ws, $data->{'date'})); } |
|
2
|
|
|
|
|
23
|
|
47
|
2
|
50
|
|
|
|
125
|
if (exists $data->{'place'}) { $self->place($data->{'place'}); } |
|
2
|
|
|
|
|
18
|
|
48
|
|
|
|
|
|
|
|
49
|
2
|
|
|
|
|
26
|
return $self; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |