ACME2/X/ACME.pm untested

filter: Statementstmt 0.0% 0 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 20 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Net::ACME2::X::ACME;
2  
3 use strict;
4 use warnings;
5  
6 use parent qw( Net::ACME2::X::Base );
7  
8 #named args required:
9 #
10 # http
11 # acme
12 #
13 #optional:
14 # headers
15 #
16 sub new {
17 my ( $self, $args_hr ) = @_;
18  
19 my $http = $args_hr->{'http'};
20  
21 my $http_str = join( ' ', $http->get('status'), $http->get('reason') );
22 my $url = $http->get('url');
23  
24 my $acme_str = $args_hr->{'acme'}->to_string();
25  
26 return $self->SUPER::new(
27 "“$url” indicated an ACME error: $http_str ($acme_str).",
28 $args_hr,
29 );
30 }
31  
32 1;