File Coverage

blib/lib/WebService/IMDB/Certificate.pm
Criterion Covered Total %
statement 22 23 95.6
branch 3 6 50.0
condition n/a
subroutine 5 5 100.0
pod n/a
total 30 34 88.2


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