| 1 | package Net::ACME2::HTTP::Response; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 3 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 3 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 3 | ▶ | use parent qw( HTTP::Tiny::UA::Response ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 3 | ▶ | use JSON (); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 3 | ▶ | use Net::ACME2::X (); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | sub die_because_unexpected { | ||||||||||||||||||||
| 13 | 0 | ▶ | my ($self) = @_; | ||||||||||||||||||
|
Subroutine
die_because_unexpected: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 0 | die Net::ACME2::X->create( | |||||||||||||||||||
| 16 | 'UnexpectedResponse', | ||||||||||||||||||||
| 17 | { | ||||||||||||||||||||
| 18 | uri => $self->url(), | ||||||||||||||||||||
| 19 | status => $self->status(), | ||||||||||||||||||||
| 20 | reason => $self->reason(), | ||||||||||||||||||||
| 21 | headers => $self->headers(), | ||||||||||||||||||||
| 22 | }, | ||||||||||||||||||||
| 23 | ); | ||||||||||||||||||||
| 24 | } | ||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | #Useful for everything but certificate issuance, apparently? | ||||||||||||||||||||
| 27 | sub content_struct { | ||||||||||||||||||||
| 28 | 24 | ▶ | my ($self) = @_; | ||||||||||||||||||
|
Subroutine
content_struct: called CC=2 SCAR=7.6
Pod
undocumented
| |||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | 24 | ▶ | my $json = ($self->{'_json'} ||= JSON->new()->allow_nonref()); | ||||||||||||||||||
|
Condition33%1/3
$self->{"_json"} ||= "JSON"->new->allow_nonref
MC/DC0%0/2
$self->{"_json"} ||= "JSON"->new->allow_nonref
$self->{"_json"}
"JSON"->new->allow_nonref
Truth table33%1/3
A ||= B
A= $self->{"_json"}B= "JSON"->new->allow_nonref
| |||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | 24 | return $json->decode( $self->content() ); | |||||||||||||||||||
| 33 | } | ||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 3 | 1; | |||||||||||||||||||