Data/ZPath/_Ctx.pm

filter: Statementstmt 100% 25 / 25 Branchbran 100% 2 / 2 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 9 / 9 Podpod 0.0% 0 / 5 totaltotal 89.1% 41 / 46 CC 3 SCAR 4.4
CC
3
Cov
100%
new
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« Data/ZPath/_Node.pm ↑ Summary Data/ZPath/_ScalarProxy.pm »
1 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Data::ZPath::_Ctx;
5  
6 9 ▶use Data::ZPath::Node;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 9 ▶use Scalar::Util qw(blessed);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 9 our $VERSION = '0.001000';
10  
11 383 ▶sub new {
Subroutine new: called CC=3 SCAR=11.0
Pod undocumented
12 383 my ( $class, $root ) = @_;
13  
14 383 my $root_node;
15 383 ▶ if ( blessed($root) and $root->isa('Data::ZPath::Node') ) {
Branch: 1 branch
BranchTrueFalseTotal
if (builtin::blessed($root) and $root->isa('Data::ZPath::Node')) { } 14 369 383
Condition100%3/3
builtin::blessed($root) and $root->isa("Data::ZPath::Node")
!ll&&!rl&&r
2868314
MC/DC100%2/2
builtin::blessed($root) and $root->isa("Data::ZPath::Node")
builtin::blessed($root) $root->isa("Data::ZPath::Node")
Truth table100%3/3
A and B
A= builtin::blessed($root)B= $root->isa("Data::ZPath::Node")
ABresult
0X0
100
111
16 14 $root_node = $root;
17 }
18 else {
19 369 $root_node = Data::ZPath::Node->from_root($root);
20 }
21  
22 383 return bless {
23 root => $root_node,
24 nodeset => [$root_node],
25 parentset => undef,
26 }, $class;
27 }
28  
29 1353 ▶sub with_nodeset {
Subroutine with_nodeset: called CC=1 SCAR=0.0
Pod undocumented
30 1353 my ( $self, $nodeset, $parentset ) = @_;
31 1353 return bless {
32 %$self,
33 nodeset => $nodeset,
34 parentset => $parentset,
35 }, ref($self);
36 }
37  
38 141 ▶sub root { $_[0]->{root} }
Subroutine root: called CC=1 SCAR=0.0
Pod undocumented
39 1304 ▶sub nodeset { $_[0]->{nodeset} }
Subroutine nodeset: called CC=1 SCAR=0.0
Pod undocumented
40 935 ▶sub parentset { $_[0]->{parentset} }
Subroutine parentset: called CC=1 SCAR=0.0
Pod undocumented
41  
42 9 1;
« Data/ZPath/_Node.pm ↑ Summary Data/ZPath/_ScalarProxy.pm »