IMDB/Runtime.pm

filter: Statementstmt 71.4% 15 / 21 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 63.3% 19 / 30 CC 3 SCAR 17.4
CC
3
Cov
60%
_new
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 5.7
« IMDB/Plot.pm ↑ Summary IMDB/DateText.pm »
1 # $Id: Runtime.pm 7370 2012-04-09 01:17:33Z chris $
2  
3 =head1 NAME
4  
5 WebService::IMDB::Runtime
6  
7 =cut
8  
9 package WebService::IMDB::Runtime;
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 Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 2 our @CARP_NOT = qw(WebService::IMDB WebService::IMDB::Title);
18  
19 2 ▶use DateTime::Duration;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21  
22 0 ▶sub _new {
Subroutine _new: not called CC=3 SCAR=24.8
23 0 my $class = shift;
24 0 my $ws = shift;
25 0 ▶ my $data = shift or die;
Branch: 1 branch
BranchTrueFalseTotal
my $data = shift() or die 0 0 0
26  
27 0 ▶ if (exists $data->{'time'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $data->{'time'}) { } 0 0 0
28 0 return DateTime::Duration->new('seconds' => $data->{'time'});
29  
30 } else {
31 0 croak "Unable to parse runtime";
32 }
33 }
34  
35 2 1;
« IMDB/Plot.pm ↑ Summary IMDB/DateText.pm »