IMDB/QuoteLine.pm

filter: Statementstmt 55.8% 19 / 34 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod n/a totaltotal 50.0% 24 / 48 CC 5 SCAR 27.4
CC
5
Cov
45%
_new
30.0
BEGIN
1.0
BEGIN
1.0
CRAP 15.5
« IMDB/CreditList.pm ↑ Summary IMDB/Credit.pm »
1 # $Id: QuoteLine.pm 7370 2012-04-09 01:17:33Z chris $
2  
3 =head1 NAME
4  
5 WebService::IMDB::QuoteLine
6  
7 =cut
8  
9 package WebService::IMDB::QuoteLine;
10  
11 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 2 our $VERSION = '0.05';
15  
16 2 ▶use base qw(Class::Accessor);
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 2 our @CARP_NOT = qw(WebService::IMDB WebService::IMDB::Title);
20  
21 2 ▶use WebService::IMDB::Char;
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 2 __PACKAGE__->mk_accessors(qw(
24 chars
25 quote
26 stage
27 ));
28  
29  
30 =head1 METHODS
31  
32 =head2 chars
33  
34 =head2 quote
35  
36 =head2 stage
37  
38 =cut
39  
40 0 ▶sub _new {
Subroutine _new: not called CC=5 SCAR=34.0
41 0 my $class = shift;
42 0 my $ws = shift;
43 0 ▶ my $data = shift or die;
Branch: 1 branch
BranchTrueFalseTotal
my $data = shift() or die 0 0 0
44  
45 0 my $self = {};
46  
47 0 bless $self, $class;
48  
49 0 ▶ if (exists $data->{'chars'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $data->{'chars'}) { } 0 0 0
50 # TODO: Some entries don't have an nconst. Need to decide whether to handle these differently.
51 0 $self->chars( [ map { WebService::IMDB::Char->_new($ws, $_) } @{$data->{'chars'}} ] );
52 } else {
53 0 $self->chars([]);
54 }
55 0 ▶ if (exists $data->{'quote'}) { $self->quote($data->{'quote'}); }
Branch: 1 branch
BranchTrueFalseTotal
if (exists $data->{"quote"}) 0 0 0
56 0 ▶ if (exists $data->{'stage'}) { $self->stage($data->{'stage'}); }
Branch: 1 branch
BranchTrueFalseTotal
if (exists $data->{"stage"}) 0 0 0
57  
58 0 return $self;
59 }
60  
61 2 1;
« IMDB/CreditList.pm ↑ Summary IMDB/Credit.pm »