Branch Coverage

blib/lib/XML/TreePP/XMLPath.pm
Criterion Covered Total %
branch 228 632 36.0


line true false branch
405 0 0 if ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
406 0 0 if (not defined $self) { }
409 0 0 if @_ >= 1 and ref $_[0] eq 'XML::TreePP'
410 0 0 if defined $$self{'tpp'} and ref $$self{'tpp'} eq 'XML::TreePP'
454 0 0 if ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or return undef
457 0 0 if (defined $val) { }
497 7 0 if ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or return undef
499 0 7 if exists $$self{$key}
553 0 1 if exists $args{'tpp'}
673 0 22 if ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
676 0 22 unless defined $args{'string'}
677 0 22 unless exists $args{'boundry_start'}
678 0 22 unless exists $args{'boundry_stop'}
679 0 22 unless exists $args{'tokens'}
680 0 22 if (@warns)
701 6 16 if ($boundry_begin == 1)
705 2 234 if ($c eq $escape_char)
710 2 232 if ($escape_char_flag)
715 180 52 unless (defined $next)
716 20 160 if ($c eq $boundry_stop)
717 14 6 if (defined $current_element)
721 4 16 if ($boundry_start ne $boundry_stop) { }
728 4 156 if ($c eq $boundry_start)
734 376 133 if (not defined $next) { }
133 0 elsif (defined $next) { }
735 5 371 if ($c eq $tkey)
741 5 128 if ($c eq $next)
747 142 66 if ($collect == 1)
751 6 16 if ($boundry_end == 1)
752 6 0 if (defined $current_element)
758 10 12 if @elements >= 1
868 1 5 if ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
869 0 6 unless (@_ == 1)
874 0 6 if (defined $self and defined $self->get('tpp')) { }
875 0 0 $self ? :
902 4 12 if (defined $h_param) { }
911 3 0 unless (defined $attr or defined $val)
915 0 3 unless (defined $attr or defined $val)
922 2 2 if ($param =~ /^(\d*)$/) { }
1 1 elsif ($param =~ /^([^\=]*)$/) { }
1008 1 0 if ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
1009 0 1 unless (@_ == 1)
1014 0 1 if (defined $self and defined $self->get('tpp')) { }
1015 0 0 $self ? :
1025 0 3 if (defined $attrs and not ref $attrs) { }
0 3 elsif (ref $attrs eq 'SCALAR') { }
1031 0 3 unless ref $attrs eq 'ARRAY'
1035 3 0 if (ref $itemattr eq 'ARRAY') { }
1041 0 3 unless defined $key
1043 1 2 if ($key =~ /^\d+$/ and not defined $val) { }
1 1 elsif ($key =~ /^\-(.*)/ or $key =~ /^\@(.*)/) { }
1048 1 0 if (defined $val) { }
1057 0 1 if (defined $val) { }
1070 1 0 if (ref $ref_path eq 'ARRAY') { }
0 0 elsif (ref $ref_path eq 'HASH') { }
1074 4 0 if (ref $pathitem eq 'ARRAY') { }
1081 3 1 if (my $param_attrs = &$assemble_attributes($attrs))
1093 0 0 if $pathitem eq '-attrs'
1097 0 0 if (my $pathitem_attrs = &$assemble_attributes($attrs))
1100 0 0 if (my $recursed_path = &$recurse($$this_path{$pathitem}))
1240 2 3 if ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
1241 0 5 unless (@_ >= 2)
1246 0 5 $options{'structure'} ? :
1253 0 5 if (defined $self and defined $self->get('tpp')) { }
1254 0 0 $self ? :
1261 5 0 if (ref $tree) { }
0 0 elsif (not defined $tree) { }
1266 0 0 $self ? :
0 0 unless (defined $tpp)
1267 0 0 if defined $tree
1269 1 4 if (ref $path) { }
1278 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGMETHOD
1279 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGDUMP
1283 0 0 unless exists $args{'node'} and exists $args{'comparevalue'}
1290 0 0 if (ref $args{'node'} eq 'HASH') { }
0 0 elsif (ref $args{'node'} eq 'ARRAY') { }
0 0 elsif (ref $args{'node'} eq 'SCALAR') { }
1291 0 0 if (exists $args{'node'}{$xml_text_id})
1292 0 0 if defined $args{'node'}{$xml_text_id} and defined $args{'comparevalue'} and $args{'node'}{$xml_text_id} eq '' and $args{'comparevalue'} eq ''
1293 0 0 unless defined $args{'node'}{$xml_text_id} or defined $args{'comparevalue'}
1294 0 0 if $args{'node'}{$xml_text_id} eq $args{'comparevalue'}
1298 0 0 if (ref $value eq 'HASH') { }
1299 0 0 if (exists $$value{$xml_text_id})
1300 0 0 if defined $$value{$xml_text_id} and defined $args{'comparevalue'} and $$value{$xml_text_id} eq '' and $args{'comparevalue'} eq ''
1301 0 0 unless defined $$value{$xml_text_id} or defined $args{'comparevalue'}
1302 0 0 if $$value{$xml_text_id} eq $args{'comparevalue'}
1305 0 0 if defined $value and defined $args{'comparevalue'} and $value eq '' and $args{'comparevalue'} eq ''
1306 0 0 unless defined $value or defined $args{'comparevalue'}
1307 0 0 if $value eq $args{'comparevalue'}
1311 0 0 if defined ${$args{'node'};} and defined $args{'comparevalue'} and ${$args{'node'};} eq '' and $args{'comparevalue'} eq ''
1312 0 0 unless defined ${$args{'node'};} or defined $args{'comparevalue'}
1313 0 0 if ${$args{'node'};} eq $args{'comparevalue'}
1315 0 0 if defined $args{'node'} and defined $args{'comparevalue'} and $args{'node'} eq '' and $args{'comparevalue'} eq ''
1316 0 0 unless defined $args{'node'} or defined $args{'comparevalue'}
1317 0 0 if $args{'node'} eq $args{'comparevalue'}
1331 1 0 if (defined $filters and defined $$filters[0] and $$filters[0][0] =~ /^\d*$/ and not defined $$filters[0][1] and $$filters[0][0] >= 1)
1336 0 1 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGFILTER
1340 1 15 if defined $position and $position >= 1
1354 0 31 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGMETHOD
1357 0 31 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGDUMP
1358 0 31 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGDUMP
1361 31 0 if (not defined $filters or @{$filters;} == 0)
1366 0 0 unless defined $filter
1371 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGFILTER
1372 0 0 if defined $value and $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGFILTER
1373 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGFILTER
1377 0 0 if (ref $xmltree_child eq 'HASH') { }
0 0 elsif ($param eq $xml_text_id and $xmltree_child =~ /\w+/ || ref $xmltree_child eq 'SCALAR' && ${$xmltree_child;} =~ /\w+/) { }
1378 0 0 if ($param ne '.' and not exists $$xmltree_child{$param}) { }
0 0 elsif ($param eq '.' || exists $$xmltree_child{$param} and not defined $value) { }
1396 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGFILTER
1397 0 0 if ($param ne '.' and &$validateFilter('node', $$xmltree_child{$param}, 'operand', '=', 'comparevalue', $value)) { }
0 0 elsif ($param eq '.' and &$validateFilter('node', $xmltree_child, 'operand', '=', 'comparevalue', $value)) { }
1402 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGFILTER
1410 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGFILTER
1414 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGFILTER
1439 0 0 if ($filters_processed_count == 0) { }
0 0 elsif ($param_match_flag == 0) { }
1458 0 0 unless $rootpath =~ m[/$]
1462 0 0 if (exists $$child{'child'}) { }
0 0 elsif (exists $$child{'target'}) { }
1464 0 0 if (ref $rpaths eq 'ARRAY') { }
1470 0 0 if (defined $$child{'target'})
1483 0 36 if ($$cmap{'name'} eq $$child{'name'} and $$cmap{'position'} eq $$child{'position'})
1495 5 21 unless (defined $mapObj)
1496 0 5 if (exists $args{'action'} and $args{'action'} eq 'new') { }
1503 0 21 if (exists $args{'action'} and $args{'action'} eq 'childcount')
1504 0 0 ref $$mapObj{'child'} eq 'ARRAY' ? :
1506 21 0 if (exists $args{'child'})
1507 6 15 if ref $$mapObj{'child'} ne 'ARRAY'
1509 0 21 if (my $cmap = &$mapChildExists($mapObj, $newchild)) { }
1512 0 0 if (ref $$newchild{'child'} eq 'ARRAY') { }
1514 0 0 if (&$mapTran($cmap, 'child', $nc_child))
1527 0 0 if (exists $args{'action'} and $args{'action'} eq 'assemble')
1535 0 16 if ref $nodename
1536 0 16 if $nodename eq $xml_text_id
1537 5 11 if $nodename =~ /^$xml_attr_id\w+$/
1538 0 11 if $nodename eq '..'
1539 0 11 if $nodename eq '.'
1547 11 31 if ($action eq 'addnode') { }
11 20 elsif ($action eq 'poplast') { }
20 0 elsif ($action eq 'clone') { }
0 0 elsif ($action eq 'length') { }
1573 0 32 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGMETHOD
1574 0 32 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGDUMP
1575 0 32 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGDUMP
1576 0 32 if ($XML::TreePP::XMLPath::DEBUG >= 1 and $XML::TreePP::XMLPath::DEBUG <= 5)
1586 16 16 if (ref $xmlpath ne 'ARRAY' or !@{$xmlpath;} >= 1)
1587 0 16 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGPATH
1595 16 16 if (@found == 0)
1596 1 15 if (not ref $xmltree) { }
0 15 elsif (ref $xmltree eq 'ARRAY') { }
15 0 elsif (ref $xmltree eq 'HASH') { }
1597 0 1 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGPATH
1606 1 0 if ($element =~ /\w+/ and $element ne '.' or defined $elementposition and !$elementposition >= 2)
1609 0 0 if (@{$xmlpath;} >= 1)
1613 0 0 if (not defined $filters or @{$filters;} < 1 or defined &$processFilters($xmltree, $filters))
1618 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGPATH
1627 0 0 unless defined $result
1628 0 0 if ref $result eq 'ARRAY'
1629 0 0 if ref $result ne 'ARRAY'
1632 0 15 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGPATH
1643 0 15 if ($nodetype eq 'text') { }
4 11 elsif ($nodetype eq 'attribute') { }
0 11 elsif ($nodetype eq 'element' and not ref $$xmltree{$element}) { }
0 11 elsif ($nodetype eq 'parent') { }
0 11 elsif ($nodetype eq 'current') { }
11 0 elsif ($nodetype eq 'element') { }
1644 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1648 0 0 if @{$xmlpath;} >= 1
1649 0 0 if defined $elementposition and $elementposition >= 2
1650 0 0 if $XML::TreePP::XMLPath::DEBUG > 1
1651 0 0 if (defined &$processFilters($$xmltree{$element}, $filters)) { }
1655 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1659 0 4 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1663 0 4 if @{$xmlpath;} >= 1
1664 0 4 if defined $elementposition and $elementposition >= 2
1665 0 4 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGPATH
1666 4 0 if (defined &$processFilters($$xmltree{$element}, $filters)) { }
1670 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1674 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1677 0 0 unless (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])))
1681 0 0 if @{$xmlpath;} >= 1
1682 0 0 if defined $elementposition and $elementposition >= 2
1684 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1685 0 0 if (defined &$processFilters($$xmltree{$element}, $filters)) { }
1690 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1694 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1695 0 0 if defined $elementposition and $elementposition >= 2
1699 0 0 unless defined $parentnode
1700 0 0 if (defined &$processFilters($parentnode, $filters)) { }
1705 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1709 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1710 0 0 if defined $elementposition and $elementposition >= 2
1711 0 0 if (defined &$processFilters($xmltree, $filters)) { }
1716 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1720 0 11 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1721 6 5 if (ref $$xmltree{$element} eq 'HASH') { }
1 4 elsif (ref $$xmltree{$element} eq 'ARRAY' and defined $elementposition and $elementposition >= 1) { }
4 0 elsif (ref $$xmltree{$element} eq 'ARRAY') { }
1722 0 6 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1723 0 6 if defined $elementposition and $elementposition >= 2
1724 6 0 if (defined &$processFilters($$xmltree{$element}, $filters)) { }
1729 6 0 if (defined $result)
1733 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1737 0 1 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1738 1 0 if (defined &$processFilters($$xmltree{$element}, $filters)) { }
1743 1 0 if (defined $result)
1747 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1751 0 4 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1761 0 20 if (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]))) { }
20 0 elsif (defined &$processFilters($sub, $tmpfilters)) { }
1768 0 20 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1773 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1776 19 1 if (defined $mresult)
1777 19 0 if ref $mresult eq 'ARRAY'
1778 0 19 if ref $mresult ne 'ARRAY'
1784 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGNODE
1788 11 4 if (ref $result eq 'ARRAY') { }
1789 11 0 unless @{$result;} == 0
1791 4 0 if defined $result
1796 0 31 if @found == 0
1809 0 0 if (&$whatisnode($$parent_path[@{$parent_path;} - 1][0]) eq 'text' or &$whatisnode($$parent_path[@{$parent_path;} - 1][0]) eq 'attribute') { }
1822 0 5 if ($o_structure =~ /^RootMap$/i) { }
0 5 elsif ($o_structure =~ /^ParentMap$/i) { }
1824 0 0 if ($XML::TreePP::XMLPath::DEBUG >= 1 and $XML::TreePP::XMLPath::DEBUG <= 5)
1829 0 0 unless defined $thismap
1833 0 0 if ($XML::TreePP::XMLPath::DEBUG >= 1 and $XML::TreePP::XMLPath::DEBUG <= 5)
1841 0 0 if ($XML::TreePP::XMLPath::DEBUG >= 1 and $XML::TreePP::XMLPath::DEBUG <= 5)
1845 0 0 unless defined $c_found
1846 0 0 if ref $c_found eq 'ARRAY'
1847 0 0 if ref $c_found ne 'ARRAY'
1855 0 5 if ($XML::TreePP::XMLPath::DEBUG >= 1 and $XML::TreePP::XMLPath::DEBUG <= 5)
1856 0 0 if defined $thismap or defined $found
1858 0 5 if ($XML::TreePP::XMLPath::DEBUG and defined $thismap) { }
0 10 elsif ($XML::TreePP::XMLPath::DEBUG and defined $found) { }
1864 0 5 if ($o_structure =~ /^RootMap$/i or $o_structure =~ /^ParentMap$/i)
1865 0 0 if ref $thismap ne 'ARRAY'
1866 0 0 if !defined($thismap) || @{$thismap;} == 0 and not defined wantarray
1867 0 0 unless defined wantarray
1868 0 0 wantarray ? :
1870 0 5 unless defined $found
1871 0 5 if ref $found ne 'ARRAY'
1872 0 5 if !defined($found) || @{$found;} == 0 and not defined wantarray
1873 0 5 unless defined wantarray
1874 0 5 wantarray ? :
1938 1 0 if ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
1939 0 1 unless (@_ >= 2)
1952 0 1 exists $args{'valstring'} ? :
1953 0 1 exists $args{'valxml'} ? :
1954 0 1 exists $args{'valxmlparsed'} ? :
1955 0 1 exists $args{'valtrim'} ? :
1957 0 1 if $v_string and $v_xmlparsed
1958 0 1 if $v_string and $v_xml
1959 1 0 if $v_string and not $v_xml and not $v_xmlparsed
1960 0 1 if not $v_string and $v_xmlparsed
1961 0 1 if not $v_string and $v_xml
1965 0 1 if (defined $self and defined $self->get('tpp')) { }
1966 0 0 $self ? :
1973 1 0 if (ref $tree) { }
0 0 elsif (not defined $tree) { }
1978 0 0 $self ? :
0 0 unless (defined $tpp)
1979 0 0 if defined $tree
1981 0 1 if (ref $path) { }
1986 0 1 if ($v_ret_type =~ /x/)
1987 0 0 if (ref $tpp ne 'XML::TreePP')
1988 0 0 $self ? :
1995 0 1 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGMETHOD
1996 0 1 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGMETHOD
1997 0 1 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGPATH
2003 0 1 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGDUMP
2007 0 5 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGMETHOD
2010 0 5 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGDUMP
2011 0 5 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGDUMP
2013 0 5 if (ref $treeNodes eq 'HASH') { }
1 4 elsif (ref $treeNodes eq 'ARRAY') { }
4 0 elsif (not ref $treeNodes) { }
2015 0 0 if exists $$utreeNodes{$xml_text_id} and $v_ret_type =~ /s/
2016 0 0 if exists $$utreeNodes{$xml_text_id} and $v_ret_type =~ /[x,p]/
2017 0 0 if $v_ret_type =~ /p/
2018 0 0 if $v_ret_type =~ /x/
2023 4 0 if defined $r2
2027 4 0 if $v_ret_type =~ /s/
2032 0 1 if ($v_ret_type =~ /x/)
2037 0 1 if ref $found ne 'ARRAY'
2039 0 1 if ($v_trim)
2042 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGDUMP
2045 0 0 if $XML::TreePP::XMLPath::DEBUG >= $XML::TreePP::XMLPath::DEBUGDUMP
2050 0 1 if !defined($found) || @{$found;} == 0 and not defined wantarray
2051 0 1 unless defined wantarray
2052 0 1 wantarray ? :
2059 0 0 if ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
2060 0 0 unless (@_ == 2)
2064 0 0 if ($self) { }
2076 0 0 if ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
2077 0 0 unless (@_ == 2)
2082 0 0 if ($self) { }
2088 0 0 unless defined $result
2089 0 0 wantarray ? :
2148 1 5 if ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
2149 0 6 unless (@_ >= 1)
2154 0 6 if (defined $self and defined $self->get('tpp')) { }
2155 0 0 $self ? :
2164 1 5 if (defined $path) { }
2170 1 5 if (ref $subtree eq 'ARRAY') { }
4 1 elsif (ref $subtree eq 'HASH') { }
2180 4 4 if ($k =~ /^$xml_attr_id/)
2248 1 5 if ref $_[0] eq $XML::TreePP::XMLPath::REF_NAME or undef
2249 0 6 unless (@_ >= 1)
2254 0 6 if (defined $self and defined $self->get('tpp')) { }
2255 0 0 $self ? :
2264 1 5 if (defined $path) { }
2270 1 5 if (ref $subtree eq 'ARRAY') { }
4 1 elsif (ref $subtree eq 'HASH') { }
2280 4 4 unless ($k =~ /^$xml_attr_id/)