| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | # $Id: UserComment.pm 7370 2012-04-09 01:17:33Z chris $ | 
| 2 |  |  |  |  |  |  |  | 
| 3 |  |  |  |  |  |  | =head1 NAME | 
| 4 |  |  |  |  |  |  |  | 
| 5 |  |  |  |  |  |  | WebService::IMDB::UserComment | 
| 6 |  |  |  |  |  |  |  | 
| 7 |  |  |  |  |  |  | =cut | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | package WebService::IMDB::UserComment; | 
| 10 |  |  |  |  |  |  |  | 
| 11 | 2 |  |  | 2 |  | 11 | use strict; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 71 |  | 
| 12 | 2 |  |  | 2 |  | 11 | use warnings; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 110 |  | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | our $VERSION = '0.05'; | 
| 15 |  |  |  |  |  |  |  | 
| 16 | 2 |  |  | 2 |  | 13 | use base qw(Class::Accessor); | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 182 |  | 
| 17 |  |  |  |  |  |  |  | 
| 18 | 2 |  |  | 2 |  | 12 | use Carp; | 
|  | 2 |  |  |  |  | 4 |  | 
|  | 2 |  |  |  |  | 819 |  | 
| 19 |  |  |  |  |  |  | our @CARP_NOT = qw(WebService::IMDB WebService::IMDB::Title); | 
| 20 |  |  |  |  |  |  |  | 
| 21 |  |  |  |  |  |  | __PACKAGE__->mk_accessors(qw( | 
| 22 |  |  |  |  |  |  | date | 
| 23 |  |  |  |  |  |  | status | 
| 24 |  |  |  |  |  |  | summary | 
| 25 |  |  |  |  |  |  | text | 
| 26 |  |  |  |  |  |  | user_location | 
| 27 |  |  |  |  |  |  | user_name | 
| 28 |  |  |  |  |  |  | user_rating | 
| 29 |  |  |  |  |  |  | user_score | 
| 30 |  |  |  |  |  |  | user_score_count | 
| 31 |  |  |  |  |  |  | )); | 
| 32 |  |  |  |  |  |  |  | 
| 33 |  |  |  |  |  |  |  | 
| 34 |  |  |  |  |  |  | =head1 METHODS | 
| 35 |  |  |  |  |  |  |  | 
| 36 |  |  |  |  |  |  | =head2 date | 
| 37 |  |  |  |  |  |  |  | 
| 38 |  |  |  |  |  |  | =head2 status | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | =head2 summart | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | =head2 text | 
| 43 |  |  |  |  |  |  |  | 
| 44 |  |  |  |  |  |  | =head2 user_location | 
| 45 |  |  |  |  |  |  |  | 
| 46 |  |  |  |  |  |  | =head2 user_name | 
| 47 |  |  |  |  |  |  |  | 
| 48 |  |  |  |  |  |  | =head2 user_rating | 
| 49 |  |  |  |  |  |  |  | 
| 50 |  |  |  |  |  |  | =head2 user_score | 
| 51 |  |  |  |  |  |  |  | 
| 52 |  |  |  |  |  |  | =head2 user_score_count | 
| 53 |  |  |  |  |  |  |  | 
| 54 |  |  |  |  |  |  | =cut | 
| 55 |  |  |  |  |  |  |  | 
| 56 |  |  |  |  |  |  | sub _new { | 
| 57 | 21 |  |  | 21 |  | 175 | my $class = shift; | 
| 58 | 21 |  |  |  |  | 25 | my $ws = shift; | 
| 59 | 21 | 50 |  |  |  | 48 | my $data = shift or die; | 
| 60 |  |  |  |  |  |  |  | 
| 61 | 21 |  |  |  |  | 34 | my $self = {}; | 
| 62 |  |  |  |  |  |  |  | 
| 63 | 21 |  |  |  |  | 84 | bless $self, $class; | 
| 64 |  |  |  |  |  |  |  | 
| 65 | 21 |  |  |  |  | 98 | $self->date(WebService::IMDB::Date->_new($ws, $data->{'date'})); | 
| 66 | 21 |  |  |  |  | 631 | $self->status($data->{'status'}); | 
| 67 | 21 | 50 |  |  |  | 204 | if (exists $data->{'summary'}) { $self->summary($data->{'summary'}); } | 
|  | 21 |  |  |  |  | 58 |  | 
| 68 | 21 |  |  |  |  | 201 | $self->text($data->{'text'}); | 
| 69 | 21 | 100 |  |  |  | 189 | if (exists $data->{'user_location'}) { $self->user_location($data->{'user_location'}); } | 
|  | 20 |  |  |  |  | 57 |  | 
| 70 | 21 | 50 |  |  |  | 179 | if (exists $data->{'user_name'}) { $self->user_name($data->{'user_name'}); } | 
|  | 21 |  |  |  |  | 63 |  | 
| 71 | 21 | 100 |  |  |  | 189 | if (exists $data->{'user_rating'}) { $self->user_rating($data->{'user_rating'}); } | 
|  | 15 |  |  |  |  | 44 |  | 
| 72 | 21 | 50 |  |  |  | 147 | if (exists $data->{'user_score'}) { $self->user_score($data->{'user_score'}); } | 
|  | 21 |  |  |  |  | 57 |  | 
| 73 | 21 | 50 |  |  |  | 202 | if (exists $data->{'user_score_count'}) { $self->user_score_count($data->{'user_score_count'}); } | 
|  | 21 |  |  |  |  | 65 |  | 
| 74 |  |  |  |  |  |  |  | 
| 75 | 21 |  |  |  |  | 303 | return $self; | 
| 76 |  |  |  |  |  |  | } | 
| 77 |  |  |  |  |  |  |  | 
| 78 |  |  |  |  |  |  | 1; |