line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Char.pm 7370 2012-04-09 01:17:33Z chris $ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
WebService::IMDB::Char |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 DESCRIPTION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Returns a L if an nconst is available. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package WebService::IMDB::Char; |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
73
|
|
16
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
91
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
19
|
|
|
|
|
|
|
|
20
|
2
|
|
|
2
|
|
11
|
use base qw(WebService::IMDB::Name); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
171
|
|
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
119
|
use Carp; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
164
|
|
23
|
|
|
|
|
|
|
our @CARP_NOT = qw(WebService::IMDB WebService::IMDB::Title); |
24
|
|
|
|
|
|
|
|
25
|
2
|
|
|
2
|
|
15
|
use WebService::IMDB::Name::Stub; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
20
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw( |
28
|
|
|
|
|
|
|
char |
29
|
|
|
|
|
|
|
)); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 METHODS |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head2 char |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=cut |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub _new { |
39
|
102
|
|
|
102
|
|
113
|
my $class = shift; |
40
|
102
|
|
|
|
|
107
|
my $ws = shift; |
41
|
102
|
|
|
|
|
95
|
my $data = shift; |
42
|
|
|
|
|
|
|
|
43
|
102
|
100
|
|
|
|
196
|
if (exists $data->{'nconst'}) { |
44
|
95
|
|
|
|
|
406
|
return WebService::IMDB::Name::Stub->_new($ws, $data); |
45
|
|
|
|
|
|
|
} else { |
46
|
7
|
|
|
|
|
19
|
my $self = {}; |
47
|
|
|
|
|
|
|
|
48
|
7
|
|
|
|
|
27
|
bless $self, $class; |
49
|
|
|
|
|
|
|
|
50
|
7
|
|
|
|
|
21
|
$self->char($data->{'char'}); |
51
|
|
|
|
|
|
|
|
52
|
7
|
|
|
|
|
94
|
return $self; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |