| 1 | package Amazon::API::HTTP::Response; | ||||||||||||
| 2 | |||||||||||||
| 3 | 11 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 11 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | ######################################################################## | ||||||||||||
| 7 | 1 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 8 | ######################################################################## | ||||||||||||
| 9 | 1 | my ( $class, $response ) = @_; | |||||||||||
| 10 | |||||||||||||
| 11 | 1 | return bless { response => $response }, $class; | |||||||||||
| 12 | } | ||||||||||||
| 13 | |||||||||||||
| 14 | ######################################################################## | ||||||||||||
| 15 | 1 | ▶ | sub content_type { | ||||||||||
|
Subroutine
content_type: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||||
| 16 | ######################################################################## | ||||||||||||
| 17 | 1 | ▶ | my $ct = $_[0]->{response}{headers}{'content-type'} // q{}; | ||||||||||
|
Condition50%1/2
$_[0]{"response"}{"headers"}{"content-type"} // ""
MC/DC0%0/1
$_[0]{"response"}{"headers"}{"content-type"} // ""
$_[0]{"response"}{"headers"}{"content-type"}
Truth table50%1/2
A
A= $_[0]{"response"}{"headers"}{"content-type"}
| |||||||||||||
| 18 | |||||||||||||
| 19 | 1 | $ct =~ s/;.*//xsm; # Modifies $ct in place | |||||||||||
| 20 | |||||||||||||
| 21 | 1 | return $ct; | |||||||||||
| 22 | } | ||||||||||||
| 23 | |||||||||||||
| 24 | 1 | ▶ | sub content { return $_[0]->{response}{content} } | ||||||||||
|
Subroutine
content: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 25 | 0 | ▶ | sub is_success { return $_[0]->{response}{success} } | ||||||||||
|
Subroutine
is_success: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 26 | 1 | ▶ | sub code { return $_[0]->{response}{status} } | ||||||||||
|
Subroutine
code: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 27 | 0 | ▶ | sub message { return $_[0]->{response}{reason} } | ||||||||||
|
Subroutine
message: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 28 | |||||||||||||
| 29 | 0 | ▶ | sub headers { return $_[0]->{response}{headers} // {} } | ||||||||||
|
Subroutine
headers: not called CC=2 SCAR=17.9
Pod
undocumented
Condition0%0/2
$_[0]{"response"}{"headers"} // {}
MC/DC0%0/1
$_[0]{"response"}{"headers"} // {}
$_[0]{"response"}{"headers"}
Truth table0%0/2
A
A= $_[0]{"response"}{"headers"}
| |||||||||||||
| 30 | |||||||||||||
| 31 | ######################################################################## | ||||||||||||
| 32 | 0 | ▶ | sub header { | ||||||||||
|
Subroutine
header: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 33 | ######################################################################## | ||||||||||||
| 34 | 0 | my ( $self, $name ) = @_; | |||||||||||
| 35 | |||||||||||||
| 36 | # HTTP::Tiny lowercases response header names (see content_type above), | ||||||||||||
| 37 | # so fold the requested name to match a botocore locationName like 'ETag'. | ||||||||||||
| 38 | 0 | return $self->{response}{headers}{ lc $name }; | |||||||||||
| 39 | } | ||||||||||||
| 40 | |||||||||||||
| 41 | 11 | 1; | |||||||||||