line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: NewsSource.pm 7370 2012-04-09 01:17:33Z chris $ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
WebService::IMDB::NewsSource |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=cut |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package WebService::IMDB::NewsSource; |
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
36
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
180
|
|
12
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
119
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
2
|
|
12
|
use base qw(Class::Accessor); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
201
|
|
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
2
|
|
13
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
511
|
|
19
|
|
|
|
|
|
|
our @CARP_NOT = qw(WebService::IMDB WebService::IMDB::Name WebService::IMDB::News); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw( |
22
|
|
|
|
|
|
|
label |
23
|
|
|
|
|
|
|
logo |
24
|
|
|
|
|
|
|
url |
25
|
|
|
|
|
|
|
)); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 METHODS |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head2 label |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head2 logo |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head2 url |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=cut |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub _new { |
39
|
30
|
|
|
30
|
|
41
|
my $class = shift; |
40
|
30
|
|
|
|
|
39
|
my $ws = shift; |
41
|
30
|
50
|
|
|
|
74
|
my $data = shift or die; |
42
|
|
|
|
|
|
|
|
43
|
30
|
|
|
|
|
65
|
my $self = {}; |
44
|
|
|
|
|
|
|
|
45
|
30
|
|
|
|
|
65
|
bless $self, $class; |
46
|
|
|
|
|
|
|
|
47
|
30
|
|
|
|
|
91
|
$self->label($data->{'label'}); |
48
|
30
|
100
|
|
|
|
330
|
if (exists $data->{'logo'}) { $self->logo($data->{'logo'}); } |
|
29
|
|
|
|
|
89
|
|
49
|
30
|
50
|
|
|
|
331
|
if (exists $data->{'url'}) { $self->url($data->{'url'}); } |
|
30
|
|
|
|
|
86
|
|
50
|
|
|
|
|
|
|
|
51
|
30
|
|
|
|
|
349
|
return $self; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |