File Coverage

blib/lib/WebService/IMDB/DateText.pm
Criterion Covered Total %
statement 24 24 100.0
branch 3 4 75.0
condition n/a
subroutine 6 6 100.0
pod n/a
total 33 34 97.0


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