File Coverage

blib/lib/WebService/IMDB/Plot.pm
Criterion Covered Total %
statement 21 21 100.0
branch 2 4 50.0
condition n/a
subroutine 5 5 100.0
pod n/a
total 28 30 93.3


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