| 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"
MC/DC0%0/1
$args{"implementation"} //= "Amazon::DynamoDB::LWP"
$args{"implementation"}
Truth table0%0/2
A
A= $args{"implementation"}
| |||||||||||||
| 16 | 0 | ▶ | unless (ref $args{implementation}) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 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'
MC/DC0%0/1
delete $args{'version'} || '20120810'
delete $args{'version'}
Truth table0%0/2
A
A= delete $args{'version'}
| |||||||||||||
| 21 | 0 | my $pkg = __PACKAGE__ . '::' . $version; | |||||||||||
| 22 | 0 | ▶ | if (my $code = $pkg->can('new')) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 23 | 0 | ▶ | $class = $pkg if $class eq __PACKAGE__; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 24 | 0 | return $code->($class, %args) | |||||||||||
| 25 | } | ||||||||||||
| 26 | 0 | die "No support for version $version"; | |||||||||||
| 27 | } | ||||||||||||
| 28 | |||||||||||||
| 29 | 11 | 1; | |||||||||||
| 30 | |||||||||||||
| 31 | __END__ | ||||||||||||