Amazon/S3/Signature/V4.pm

filter: Statementstmt 44.0% 11 / 25 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 60.0% 3 / 5 Podpod 50.0% 1 / 2 totaltotal 36.5% 15 / 41 CC 4 SCAR 18.5
CC
4
Cov
34%
new
12.0
region
6.0
BEGIN
1.0
CRAP 6.4
« Amazon/S3/BucketV2.pm ↑ Summary Amazon/S3/Util.pm »
1 package Amazon::S3::Signature::V4;
2  
3 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 12 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 12 our $VERSION = '2.1.4';
7  
8 12 ▶use parent qw{Net::Amazon::Signature::V4};
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 ########################################################################
11 0 ▶sub new {
Subroutine new: not called CC=3 SCAR=24.8
Pod documented
12 ########################################################################
13 0 my ( $class, @args ) = @_;
14  
15 0 my %options;
16  
17 0 ▶ if ( !ref $args[0] ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not ref $args[0]) { } 0 0 0
18 0 @options{qw{access_key_id secret endpoint service}} = @args;
19 }
20 else {
21 0 %options = %{ $args[0] };
22 }
23  
24 0 my $region = delete $options{region};
25 0 ▶ $options{endpoint} //= $region;
Condition0%0/3
$options{"endpoint"} //= $region
l!l&&r!l&&!r
000
MC/DC0%0/2
$options{"endpoint"} //= $region
$options{"endpoint"} $region
Truth table0%0/3
A //= B
A= $options{"endpoint"}B= $region
ABresult
1X1
011
000
26  
27 0 my $self = $class->SUPER::new( \%options );
28  
29 0 return $self;
30 }
31  
32 ########################################################################
33 0 ▶sub region {
Subroutine region: not called CC=2 SCAR=17.9
Pod undocumented
34 ########################################################################
35 0 my ( $self, @args ) = @_;
36  
37 0 ▶ if (@args) {
Branch: 1 branch
BranchTrueFalseTotal
if (@args) 0 0 0
38 0 $self->{endpoint} = $args[0];
39 }
40  
41 0 return $self->{endpoint};
42 }
43  
44 12 1;
« Amazon/S3/BucketV2.pm ↑ Summary Amazon/S3/Util.pm »