Native/Error.pm

filter: Statementstmt 92.3% 12 / 13 Branchbran 50.0% 1 / 2 Conditioncond 60.0% 3 / 5 MC/DCmcdc 33.3% 1 / 3 Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 76.0% 19 / 25 CC 4 SCAR 13.5
CC
4
Cov
80%
__ANON__
4.6
BEGIN
1.0
CRAP 3.9
« Native/Signature.pm ↑ Summary Native/Config.pm »
1 # ABSTRACT: Exception class for Git::Native
2  
3 package Git::Native::Error;
4 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 extends 'Throwable::Error';
6  
7 1 has code => ( is => 'ro', required => 1 );
8 1 has klass => ( is => 'ro', default => 0 );
9  
10 around BUILDARGS => sub {
11 3 ▶ my ( $orig, $class, @args ) = @_;
Subroutine __ANON__: called CC=4 SCAR=15.2
12 3 ▶ my %args = @args == 1 && ref $args[0] ? %{ $args[0] } : @args;
Branch: 1 branch
BranchTrueFalseTotal
@args == 1 && ref $args[0] ? : 0 3 3
Condition33%1/3
@args == 1 and ref $args[0]
!ll&&!rl&&r
300
MC/DC0%0/2
@args == 1 and ref $args[0]
@args == 1 ref $args[0]
Truth table33%1/3
A and B
A= @args == 1B= ref $args[0]
ABresult
0X0
100
111
13 3 ▶ $args{message} //= '<unknown libgit2 error>';
Condition100%2/2
$args{"message"} //= "<unknown libgit2 error>"
l!l
21
MC/DC100%1/1
$args{"message"} //= "<unknown libgit2 error>"
$args{"message"}
Truth table100%2/2
A
A= $args{"message"}
Aresult
11
00
14 3 return $class->$orig(\%args);
15 1 };
16  
17 1 1;
18  
19 __END__
« Native/Signature.pm ↑ Summary Native/Config.pm »