ACME2/AccessorBase.pm

filter: Statementstmt 94.7% 18 / 19 Branchbran 66.6% 4 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 86.6% 26 / 30 CC 5 SCAR 10.4
CC
5
Cov
88%
AUTOLOAD
4.2
new
2.0
BEGIN
1.0
CRAP 2.8
« ACME2/JWTMaker.pm ↑ Summary ACME2/Challenge/dns_01.pm »
1 package Net::ACME2::AccessorBase;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $AUTOLOAD;
7  
8 sub new {
9 1 ▶ my ($class, %opts) = @_;
Subroutine new: called CC=2 SCAR=6.9
Pod undocumented
10  
11 1 $opts{"_$_"} = delete $opts{$_} for keys %opts;
12  
13 1 return bless \%opts, $class;
14 }
15  
16 sub AUTOLOAD {
17 5 ▶ my ($self) = @_;
Subroutine AUTOLOAD: called CC=4 SCAR=14.2
18  
19 5 ▶ $AUTOLOAD =~ m<(.+)::(.+)> or die "Weird func name: “$AUTOLOAD”!";
Branch: 1 branch
BranchTrueFalseTotal
$Net::ACME2::AccessorBase::AUTOLOAD =~ /(.+)::(.+)/ or die "Weird func name: \342\200\234$Net::ACME2::AccessorBase::AUTOLOAD\342\200\235!" 0 5 5
20 5 my ($class, $method) = ($1, $2);
21  
22 5 ▶ if ( grep { $method eq $_ } $self->_ACCESSORS() ) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep {$method eq $_;} $self->_ACCESSORS) 4 1 5
23 4 return $self->{"_$method"};
24 }
25  
26 1 ▶ return if $method eq 'DESTROY';
Branch: 1 branch
BranchTrueFalseTotal
if $method eq "DESTROY" 1 0 1
27  
28 0 die "“$class” doesn’t define a method “$method”!";
29 }
30  
31 2 1;
« ACME2/JWTMaker.pm ↑ Summary ACME2/Challenge/dns_01.pm »