Condition Coverage

blib/lib/XML/TreePP/XMLPath.pm
Criterion Covered Total %
condition 101 386 26.1


and 3 conditions

line !l l&&!r l&&r condition
409 0 0 0 @_ >= 1 and ref $_[0] eq 'XML::TreePP'
410 0 0 0 defined $$self{'tpp'} and ref $$self{'tpp'} eq 'XML::TreePP'
874 5 1 0 defined $self and defined $self->get('tpp')
1014 0 1 0 defined $self and defined $self->get('tpp')
1025 0 3 0 defined $attrs and not ref $attrs
1043 2 0 1 $key =~ /^\d+$/ and not defined $val
1253 3 2 0 defined $self and defined $self->get('tpp')
1283 0 0 0 exists $args{'node'} and exists $args{'comparevalue'}
1292 0 0 0 defined $args{'node'}{$xml_text_id} and defined $args{'comparevalue'}
0 0 0 defined $args{'node'}{$xml_text_id} and defined $args{'comparevalue'} and $args{'node'}{$xml_text_id} eq ''
0 0 0 defined $args{'node'}{$xml_text_id} and defined $args{'comparevalue'} and $args{'node'}{$xml_text_id} eq '' and $args{'comparevalue'} eq ''
1300 0 0 0 defined $$value{$xml_text_id} and defined $args{'comparevalue'}
0 0 0 defined $$value{$xml_text_id} and defined $args{'comparevalue'} and $$value{$xml_text_id} eq ''
0 0 0 defined $$value{$xml_text_id} and defined $args{'comparevalue'} and $$value{$xml_text_id} eq '' and $args{'comparevalue'} eq ''
1305 0 0 0 defined $value and defined $args{'comparevalue'}
0 0 0 defined $value and defined $args{'comparevalue'} and $value eq ''
0 0 0 defined $value and defined $args{'comparevalue'} and $value eq '' and $args{'comparevalue'} eq ''
1311 0 0 0 defined ${$args{'node'};} and defined $args{'comparevalue'}
0 0 0 defined ${$args{'node'};} and defined $args{'comparevalue'} and ${$args{'node'};} eq ''
0 0 0 defined ${$args{'node'};} and defined $args{'comparevalue'} and ${$args{'node'};} eq '' and $args{'comparevalue'} eq ''
1315 0 0 0 defined $args{'node'} and defined $args{'comparevalue'}
0 0 0 defined $args{'node'} and defined $args{'comparevalue'} and $args{'node'} eq ''
0 0 0 defined $args{'node'} and defined $args{'comparevalue'} and $args{'node'} eq '' and $args{'comparevalue'} eq ''
1331 15 0 1 defined $filters and defined $$filters[0]
15 0 1 defined $filters and defined $$filters[0] and $$filters[0][0] =~ /^\d*$/
0 0 1 defined $filters and defined $$filters[0] and $$filters[0][0] =~ /^\d*$/ and not defined $$filters[0][1]
0 0 1 defined $filters and defined $$filters[0] and $$filters[0][0] =~ /^\d*$/ and not defined $$filters[0][1] and $$filters[0][0] >= 1
1340 15 0 1 defined $position and $position >= 1
1372 0 0 0 defined $value and $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGFILTER
1377 0 0 0 $param eq $xml_text_id and $xmltree_child =~ /\w+/ || ref $xmltree_child eq 'SCALAR' && ${$xmltree_child;} =~ /\w+/
1378 0 0 0 $param ne '.' and not exists $$xmltree_child{$param}
0 0 0 $param eq '.' || exists $$xmltree_child{$param} and not defined $value
1397 0 0 0 $param ne '.' and &$validateFilter('node', $$xmltree_child{$param}, 'operand', '=', 'comparevalue', $value)
0 0 0 $param eq '.' and &$validateFilter('node', $xmltree_child, 'operand', '=', 'comparevalue', $value)
1483 0 36 0 $$cmap{'name'} eq $$child{'name'} and $$cmap{'position'} eq $$child{'position'}
1496 5 0 0 exists $args{'action'} and $args{'action'} eq 'new'
1503 21 0 0 exists $args{'action'} and $args{'action'} eq 'childcount'
1527 0 0 0 exists $args{'action'} and $args{'action'} eq 'assemble'
1576 32 0 0 $XML::TreePP::XMLPath::DEBUG >= 1 and $XML::TreePP::XMLPath::DEBUG <= 5
1606 0 0 1 $element =~ /\w+/ and $element ne '.'
0 0 0 defined $elementposition and !$elementposition >= 2
1643 0 11 0 $nodetype eq 'element' and not ref $$xmltree{$element}
1649 0 0 0 defined $elementposition and $elementposition >= 2
1664 4 0 0 defined $elementposition and $elementposition >= 2
1677 0 0 0 defined $$xmltree{$element} and $$xmltree{$element} =~ /\w+/
0 0 0 ref $xmlpath eq 'ARRAY' and @{$xmlpath;} == 1
0 0 0 ref $xmlpath eq 'ARRAY' and @{$xmlpath;} == 1 and &$whatisnode($$xmlpath[0][0]) eq 'text'
0 0 0 ref $xmlpath eq 'ARRAY' and @{$xmlpath;} == 1 and &$whatisnode($$xmlpath[0][0]) eq 'text' and defined &$processFilters($$xmltree{$element}, $$xmlpath[0][1])
0 0 0 defined $$xmltree{$element} and $$xmltree{$element} =~ /\w+/ and (ref $xmlpath eq 'ARRAY' and @{$xmlpath;} == 1 and &$whatisnode($$xmlpath[0][0]) eq 'text' and defined &$processFilters($$xmltree{$element}, $$xmlpath[0][1]))
1682 0 0 0 defined $elementposition and $elementposition >= 2
1695 0 0 0 defined $elementposition and $elementposition >= 2
1710 0 0 0 defined $elementposition and $elementposition >= 2
1721 0 4 1 ref $$xmltree{$element} eq 'ARRAY' and defined $elementposition
4 0 1 ref $$xmltree{$element} eq 'ARRAY' and defined $elementposition and $elementposition >= 1
1723 6 0 0 defined $elementposition and $elementposition >= 2
1761 16 0 4 not ref $sub and $sub =~ /\w+/
0 3 1 ref $xmlpath eq 'ARRAY' and @{$xmlpath;} == 1
3 1 0 ref $xmlpath eq 'ARRAY' and @{$xmlpath;} == 1 and &$whatisnode($$xmlpath[0][0]) eq 'text'
4 0 0 ref $xmlpath eq 'ARRAY' and @{$xmlpath;} == 1 and &$whatisnode($$xmlpath[0][0]) eq 'text' and defined &$processFilters($sub, $$tmpxmlpath[0][1])
16 4 0 not ref $sub and $sub =~ /\w+/ and (ref $xmlpath eq 'ARRAY' and @{$xmlpath;} == 1 and &$whatisnode($$xmlpath[0][0]) eq 'text' and defined &$processFilters($sub, $$tmpxmlpath[0][1]))
1824 0 0 0 $XML::TreePP::XMLPath::DEBUG >= 1 and $XML::TreePP::XMLPath::DEBUG <= 5
1833 0 0 0 $XML::TreePP::XMLPath::DEBUG >= 1 and $XML::TreePP::XMLPath::DEBUG <= 5
1841 0 0 0 $XML::TreePP::XMLPath::DEBUG >= 1 and $XML::TreePP::XMLPath::DEBUG <= 5
1855 5 0 0 $XML::TreePP::XMLPath::DEBUG >= 1 and $XML::TreePP::XMLPath::DEBUG <= 5
1858 5 0 0 $XML::TreePP::XMLPath::DEBUG and defined $thismap
5 0 0 $XML::TreePP::XMLPath::DEBUG and defined $found
1866 0 0 0 !defined($thismap) || @{$thismap;} == 0 and not defined wantarray
1872 5 0 0 !defined($found) || @{$found;} == 0 and not defined wantarray
1957 0 1 0 $v_string and $v_xmlparsed
1958 0 1 0 $v_string and $v_xml
1959 0 0 1 $v_string and not $v_xml
0 0 1 $v_string and not $v_xml and not $v_xmlparsed
1960 1 0 0 not $v_string and $v_xmlparsed
1961 1 0 0 not $v_string and $v_xml
1965 0 1 0 defined $self and defined $self->get('tpp')
2015 0 0 0 exists $$utreeNodes{$xml_text_id} and $v_ret_type =~ /s/
2016 0 0 0 exists $$utreeNodes{$xml_text_id} and $v_ret_type =~ /[x,p]/
2050 1 0 0 !defined($found) || @{$found;} == 0 and not defined wantarray
2154 5 1 0 defined $self and defined $self->get('tpp')
2254 5 1 0 defined $self and defined $self->get('tpp')

or 2 conditions

line l !l condition
405 0 0 ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
454 0 0 ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or return undef
497 7 0 ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or return undef
673 0 22 ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
686 6 16 $args{'boundry_begin'} || 0
687 6 16 $args{'boundry_end'} || 0
688 0 22 $args{'escape_char'} || '\\'
868 1 5 ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
876 0 0 $tpp->get('text_node_key') || '#text'
877 0 0 $tpp->get('attr_prefix') || '-'
894 4 12 charlexsplit('string', $el, 'boundry_start', '[', 'boundry_stop', ']', 'tokens', [q['], q['], '"', '"'], 'boundry_begin', 0, 'boundry_end', 0) || undef
1008 1 0 ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
1016 0 0 $tpp->get('text_node_key') || '#text'
1017 0 0 $tpp->get('attr_prefix') || '-'
1024 3 1 shift() || (return undef)
1240 2 3 ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
1255 0 0 $tpp->get('text_node_key') || '#text'
1256 0 0 $tpp->get('attr_prefix') || '-'
1457 0 0 $_[0] || $$mapObj{'path'} || '/'
1545 42 0 shift() || (return undef)
1546 42 0 shift() || (return undef)
1571 27 5 shift() || undef
1572 27 5 shift() || []
1938 1 0 ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
1967 0 0 $tpp->get('text_node_key') || '#text'
1968 0 0 $tpp->get('attr_prefix') || '-'
2011 0 0 ref $treeNodes || 'string'
2059 0 0 ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
2076 0 0 ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
2148 1 5 ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
2151 1 5 shift() || undef
2156 0 0 $tpp->get('text_node_key') || '#text'
2157 0 0 $tpp->get('attr_prefix') || '-'
2248 1 5 ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
2251 1 5 shift() || undef
2256 0 0 $tpp->get('text_node_key') || '#text'
2257 0 0 $tpp->get('attr_prefix') || '-'

or 3 conditions

line l !l&&r !l&&!r condition
549 0 1 0 ref $pkg || $pkg
911 1 0 3 defined $attr or defined $val
915 1 0 3 defined $attr or defined $val
1043 1 0 1 $key =~ /^\-(.*)/ or $key =~ /^\@(.*)/
1242 5 0 0 shift() || carp((return undef))
1243 5 0 0 shift() || carp((return undef))
1293 0 0 0 defined $args{'node'}{$xml_text_id} or defined $args{'comparevalue'}
1301 0 0 0 defined $$value{$xml_text_id} or defined $args{'comparevalue'}
1306 0 0 0 defined $value or defined $args{'comparevalue'}
1312 0 0 0 defined ${$args{'node'};} or defined $args{'comparevalue'}
1316 0 0 0 defined $args{'node'} or defined $args{'comparevalue'}
1361 30 1 0 not defined $filters or @{$filters;} == 0
1377 0 0 0 $xmltree_child =~ /\w+/ || ref $xmltree_child eq 'SCALAR' && ${$xmltree_child;} =~ /\w+/
1378 0 0 0 $param eq '.' || exists $$xmltree_child{$param}
1586 0 16 16 ref $xmlpath ne 'ARRAY' or !@{$xmlpath;} >= 1
1606 1 0 0 $element =~ /\w+/ and $element ne '.' or defined $elementposition and !$elementposition >= 2
1613 0 0 0 not defined $filters or @{$filters;} < 1
0 0 0 not defined $filters or @{$filters;} < 1 or defined &$processFilters($xmltree, $filters)
1809 0 0 0 &$whatisnode($$parent_path[@{$parent_path;} - 1][0]) eq 'text' or &$whatisnode($$parent_path[@{$parent_path;} - 1][0]) eq 'attribute'
1856 0 0 0 defined $thismap or defined $found
1864 0 0 5 $o_structure =~ /^RootMap$/i or $o_structure =~ /^ParentMap$/i
1866 0 0 0 !defined($thismap) || @{$thismap;} == 0
1872 0 0 5 !defined($found) || @{$found;} == 0
2050 0 0 1 !defined($found) || @{$found;} == 0