lib/Amazon/DynamoDB.pm

filter: Statementstmt 53.8% 14 / 26 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 40.9% 18 / 44 CC 6 SCAR 32.4
CC
6
Cov
39%
new
42.0
BEGIN
1.0
BEGIN
1.0
CRAP 25.6
« lib/Amazon/DynamoDB/20120810.pm ↑ Summary lib/Amazon/DynamoDB/Types.pm »
1 package Amazon::DynamoDB;
2 11 $Amazon::DynamoDB::VERSION = '0.35';
3 # ABSTRACT: API support for Amazon DynamoDB
4 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 11 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7  
8 11 ▶use Amazon::DynamoDB::20120810;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 11 ▶use Module::Load;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11  
12 0 ▶sub new {
Subroutine new: not called CC=6 SCAR=37.4
Pod undocumented
13 0 my $class = shift;
14 0 my %args = @_;
15 0 ▶ $args{implementation} //= __PACKAGE__ . '::LWP';
Condition0%0/2
$args{"implementation"} //= "Amazon::DynamoDB::LWP"
l!l
00
MC/DC0%0/1
$args{"implementation"} //= "Amazon::DynamoDB::LWP"
$args{"implementation"}
Truth table0%0/2
A
A= $args{"implementation"}
Aresult
11
00
16 0 ▶ unless (ref $args{implementation}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (ref $args{"implementation"}) 0 0 0
17 0 Module::Load::load($args{implementation});
18 0 $args{implementation} = $args{implementation}->new(%args);
19 }
20 0 ▶ my $version = delete $args{version} || '20120810';
Condition0%0/2
delete $args{'version'} || '20120810'
l!l
00
MC/DC0%0/1
delete $args{'version'} || '20120810'
delete $args{'version'}
Truth table0%0/2
A
A= delete $args{'version'}
Aresult
11
00
21 0 my $pkg = __PACKAGE__ . '::' . $version;
22 0 ▶ if (my $code = $pkg->can('new')) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $code = $pkg->can("new")) 0 0 0
23 0 ▶ $class = $pkg if $class eq __PACKAGE__;
Branch: 1 branch
BranchTrueFalseTotal
if $class eq __PACKAGE__ 0 0 0
24 0 return $code->($class, %args)
25 }
26 0 die "No support for version $version";
27 }
28  
29 11 1;
30  
31 __END__
« lib/Amazon/DynamoDB/20120810.pm ↑ Summary lib/Amazon/DynamoDB/Types.pm »