ACME/X/HashBase.pm

filter: Statementstmt 100% 18 / 18 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 3 totaltotal 89.6% 26 / 29 CC 2 SCAR 2.5
CC
2
Cov
100%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« ACME/Certificate/Pending.pm ↑ Summary ACME/Challenge/Pending.pm »
1 package Net::ACME::X::HashBase;
2  
3 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 9 ▶use parent qw( Net::ACME::X::OverloadBase );
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 22 ▶sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod undocumented
9 22 my ( $class, $string, $props_hr ) = @_;
10  
11 22 $class->_check_overload();
12  
13 22 ▶ my %attrs = $props_hr ? %$props_hr : ();
Branch: 1 branch
BranchTrueFalseTotal
$props_hr ? : 19 3 22
14  
15 22 return bless [ $string, \%attrs ], $class;
16 }
17  
18 41 ▶sub get {
Subroutine get: called CC=1 SCAR=0.0
Pod undocumented
19 41 my ( $self, $attr ) = @_;
20  
21 #Do we need to clone this? Could JSON suffice, or do we need Clone?
22 41 return $self->[1]{$attr};
23 }
24  
25 45 ▶sub to_string {
Subroutine to_string: called CC=1 SCAR=0.0
Pod undocumented
26 45 my ($self) = @_;
27  
28 45 return $self->[0];
29 }
30  
31 9 1;
« ACME/Certificate/Pending.pm ↑ Summary ACME/Challenge/Pending.pm »