Pad/Error.pm

filter: Statementstmt 93.7% 30 / 32 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 87.5% 7 / 8 Podpod 100% 4 / 4 totaltotal 85.7% 42 / 49 CC 2 SCAR 2.1
CC
2
Cov
89%
attachContext
2.0
level
1.0
throw
1.0
CRAP 1.2
« Pad/Type/Url.pm ↑ Summary Pad/Config/Format.pm »
1 11 ▶use v5.26;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 11 ▶use Object::Pad;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 class Getopt::Pad::Error {
5 11 ▶ use overload '""' => sub { $_[0]->message }, fallback => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
6  
7 11 our $VERSION = '0.04';
8  
9 131 ▶ field $message :param :reader;
Subroutine message: called CC=1 SCAR=0.0
Pod documented
10 field $level :param :reader = undef;
11  
12 0 ▶ method throw :common ($format, @args) {
Subroutine level: not called CC=1 SCAR=0.2
Subroutine throw: called CC=1 SCAR=0.1
Pod documented
Pod documented
13 65 die $class->new(message => sprintf($format, @args));
14 11 }
15  
16 52 ▶ method attachContext($contextLevel) {
Subroutine attachContext: called CC=2 SCAR=7.1
Pod documented
17 52 ▶ $level //= $contextLevel;
Condition33%1/3
$level //= $contextLevel
l!l&&r!l&&!r
0520
MC/DC0%0/2
$level //= $contextLevel
$level $contextLevel
Truth table33%1/3
A //= B
A= $levelB= $contextLevel
ABresult
1X1
011
000
18 52 return $self;
19 11 }
20 }
21  
22 11 1;
23  
24 __END__
« Pad/Type/Url.pm ↑ Summary Pad/Config/Format.pm »