| 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
| |||||||||||||||||||||
| 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
MC/DC0%0/2
$options{"endpoint"} //= $region
$options{"endpoint"}
$region
Truth table0%0/3
A //= B
A= $options{"endpoint"}B= $region
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 38 | 0 | $self->{endpoint} = $args[0]; | |||||||||||||||||||
| 39 | } | ||||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | 0 | return $self->{endpoint}; | |||||||||||||||||||
| 42 | } | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | 12 | 1; | |||||||||||||||||||