| 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
Condition100%3/3
builtin::blessed($root) and $root->isa("Data::ZPath::Node")
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")
| |||||||||||||||||||||||||||||
| 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; | |||||||||||||||||||||||||||