blib/lib/Salvation/TC/Exception.pm

filter: Statementstmt 92.3% 12 / 13 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 2 totaltotal 69.2% 18 / 26 SCAR 11.3
CC
3
Cov
78%
new
2.3
throw
2.1
BEGIN
1.0
CRAP 3.1
« blib/lib/Salvation/TC/Exception/WrongType/TC.pm ↑ Summary blib/lib/Salvation/TC/Exception/WrongType.pm »
1 package Salvation::TC::Exception;
2  
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 sub new {
7  
8 184 ▶ my ( $self, %args ) = @_;
Subroutine new: called CC=2 SCAR=8.1
Pod undocumented
9  
10 184 ▶ return bless( \%args, ( ref( $self ) || $self ) );
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
01840
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
11 }
12  
13 sub throw {
14  
15 147 ▶ my ( $self, @rest ) = @_;
Subroutine throw: called CC=2 SCAR=7.6
Pod undocumented
16  
17 147 ▶ if( ref $self ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $self) { } 0 147 147
18  
19 0 die( $self );
20  
21 } else {
22  
23 147 die( $self -> new( @rest ) );
24 }
25 }
26  
27 4 1;
28  
29 __END__
« blib/lib/Salvation/TC/Exception/WrongType/TC.pm ↑ Summary blib/lib/Salvation/TC/Exception/WrongType.pm »