File Coverage

blib/lib/WebService/IMDB/KnownFor.pm
Criterion Covered Total %
statement 24 24 100.0
branch 2 4 50.0
condition n/a
subroutine 6 6 100.0
pod n/a
total 32 34 94.1


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