Deep/Isa.pm

filter: Statementstmt 100% 24 / 24 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 4 totaltotal 89.4% 34 / 38 CC 2 SCAR 2.0
CC
2
Cov
100%
descend
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Deep/Ref.pm ↑ Summary Deep/Obj.pm »
1 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Test::Deep::Isa 1.205;
5  
6 2 ▶use Test::Deep::Cmp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use Scalar::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 sub init
10 6 ▶{
Subroutine init: called CC=1 SCAR=0.0
Pod undocumented
11 6 my $self = shift;
12  
13 6 my $val = shift;
14 6 $self->{val} = $val;
15 }
16  
17 sub descend
18 6 ▶{
Subroutine descend: called CC=2 SCAR=6.9
Pod undocumented
19 6 my $self = shift;
20 6 my $got = shift;
21  
22 return Scalar::Util::blessed($got)
23 ? $got->isa($self->{val})
24 6 ▶ : ref($got) eq $self->{val};
Branch: 1 branch
BranchTrueFalseTotal
builtin::blessed($got) ? : 4 2 6
25 }
26  
27 sub diag_message
28 2 ▶{
Subroutine diag_message: called CC=1 SCAR=0.0
Pod undocumented
29 2 my $self = shift;
30  
31 2 my $where = shift;
32  
33 2 return "Checking class of $where with isa()";
34 }
35  
36 sub renderExp
37 2 ▶{
Subroutine renderExp: called CC=1 SCAR=0.0
Pod undocumented
38 2 my $self = shift;
39  
40 2 return "blessed into or ref of type '$self->{val}'";
41 }
42  
43 2 1;
44  
45 __END__
« Deep/Ref.pm ↑ Summary Deep/Obj.pm »