Condition Coverage

blib/lib/XML/XSH/Functions.pm
Criterion Covered Total %
condition 0 431 0.0


and 3 conditions

line !l l&&!r l&&r condition
256 0 0 0 ref $nodelist and $nodelist->isa('XML::LibXML::NodeList')
265 0 0 0 ref $nodea and $nodea->isa('XML::LibXML::NodeList')
267 0 0 0 ref $nodeb and $nodeb->isa('XML::LibXML::NodeList')
269 0 0 0 $nodea->size && $nodeb->size && $nodea->[0]->isSameNode($nodea->[0])
403 0 0 0 $name =~ /^_\.(.*)$/ and exists $_nodelist{$1}
416 0 0 0 $_[0] =~ /^\$(.*)/ and defined ${"XML::XSH::Map::$1";}
0 0 0 $_[0] =~ /^\%(.*)/ and exists $_nodelist{$1}
461 0 0 0 defined toUTF8($enc, '') and defined fromUTF8($enc, '')
568 0 0 0 $XML::XSH::Functions::LOCAL_NODE and $id eq $XML::XSH::Functions::LOCAL_ID
680 0 0 0 @children == 1 and $XML::XSH::Functions::_xml_module->xml_equal($node, $children[0])
837 0 0 0 @XML::XSH::Functions::stored_variables and ref $XML::XSH::Functions::stored_variables[$#XML::XSH::Functions::stored_variables]
1182 0 0 0 $XML::XSH::Functions::_xml_module->is_xinclude_end($node) && $nested == 0 && $expanded
0 0 0 $node and not $XML::XSH::Functions::_xml_module->is_xinclude_end($node) && $nested == 0 && $expanded
1191 0 0 0 not $node and $XML::XSH::Functions::_xml_module->is_xinclude_start($child)
0 0 0 $xinc{'parse'} ne 'text' and $elements == 0
0 0 0 $xinc{'parse'} ne 'xml' and $elements > 1
0 0 0 $xinc{'parse'} eq 'text' and $elements > 0
1274 0 0 0 $target eq 'file' and $file eq ''
1293 0 0 0 $XML::XSH::Functions::_xml_module->doc_encoding($doc) eq '' && lc $enc eq 'utf-8'
0 0 0 lc $XML::XSH::Functions::_xml_module->doc_encoding($doc) ne lc $enc and not $XML::XSH::Functions::_xml_module->doc_encoding($doc) eq '' && lc $enc eq 'utf-8'
1382 0 0 0 ref $node and $XML::XSH::Functions::_xml_module->is_element($node)
0 0 0 ref $node and $XML::XSH::Functions::_xml_module->is_element($node) and $folding
0 0 0 ref $node and $XML::XSH::Functions::_xml_module->is_element($node) and $folding and $node->hasAttributeNS($XML::XSH::xshNS, 'fold')
1391 0 0 0 $depth < 0 and not $folding
0 0 0 ref $node and $XML::XSH::Functions::_xml_module->is_element($node)
0 0 0 ref $node and $XML::XSH::Functions::_xml_module->is_element($node) and $depth == 0
1404 0 0 0 $node->can('getVersion') and $node->can('getEncoding')
1440 0 0 0 $folding && ($XML::XSH::Functions::_xml_module->is_element($_) || $XML::XSH::Functions::_xml_module->is_document($_)) && $_->findvalue("count(.//\@*[local-name()='fold' and namespace-uri()='$XML::XSH::xshNS'])")
1500 0 0 0 $XML::XSH::Functions::_xml_module->is_element($node) and $node->hasAttributeNS($XML::XSH::xshNS, 'fold')
1646 0 0 0 $node->can('setData') and $node->can('getData')
1712 0 0 0 $XML::XSH::Functions::_xml_module->is_element($node) and not $node->hasChildNodes
1715 0 0 0 $ns eq '' and name_prefix($node->getName) ne ''
1881 0 0 0 $ns eq '' and name_prefix($name) ne ''
1887 0 0 0 $where eq 'replace' and $name ne $dest->getName
1964 0 0 0 $ns eq '' and name_prefix($node->getName) ne ''
2022 0 0 0 $where =~ /^(?:into|append|prepend)$/ and $XML::XSH::Functions::_xml_module->is_entity_reference($dest) || $XML::XSH::Functions::_xml_module->is_entity_reference($node)
2029 0 0 0 $where eq 'replace' and $XML::XSH::Functions::_xml_module->is_attribute($node)
2047 0 0 0 $ns eq '' and name_prefix($node->getName) ne ''
2122 0 0 0 ref(my $fp = shift @$fl) and ref(my $tp = shift @$tl)
2170 0 0 0 $dest and $XML::XSH::Functions::_xml_module->is_element($dest)
2181 0 0 0 $ns ne '' and $_->[0] =~ /^$prefix:/
2198 0 0 0 $_->[0] eq "xmlns:$prefix" and $_->[1] eq $ns
2214 0 0 0 $_->[0] =~ /^([^:]+):/ and $1 ne 'xmlns'
2241 0 0 0 $elt =~ /^([^:]+):/ and $1 ne 'xmlns'
2643 0 0 0 $sibling and $XML::XSH::Functions::_xml_module->is_text($sibling)
0 0 0 $sibling and $XML::XSH::Functions::_xml_module->is_text($sibling) and $sibling->getData =~ /^\s+$/
2759 0 0 0 not $trapsignals and $@ =~ /^SIGINT|^SIGPIPE/
2826 0 0 0 run_commands($command) && $result
2828 0 0 0 ref $@ and $@->isa('XML::XSH::Internal::LoopTerminatingException')
2829 0 0 0 $@->label =~ /^(?:next|last|redo)$/ and $@->[1] > 1
2849 0 0 0 run_commands($command) && $result
2851 0 0 0 ref $@ and $@->isa('XML::XSH::Internal::LoopTerminatingException')
2852 0 0 0 $@->label =~ /^(?:next|last|redo)$/ and $@->[1] > 1
2886 0 0 0 ref $@ and $@->isa('XML::XSH::Internal::UncatchableException')
2893 0 0 0 ref $var and @{$var;} > 1
2944 0 0 0 ref $@ and $@->isa('XML::XSH::Internal::LoopTerminatingException')
2945 0 0 0 $@->label =~ /^(?:next|last|redo)$/ and $@->[1] > 1
2975 0 0 0 ref $@ and $@->isa('XML::XSH::Internal::LoopTerminatingException')
2976 0 0 0 $@->label =~ /^(?:next|last|redo)$/ and $@->[1] > 1
3003 0 0 0 ref $xp eq 'ARRAY' and count($xp)
0 0 0 not ref $xp and perl_eval($xp)
3060 0 0 0 get_doc($xupdate_id) and get_doc($id)
3112 0 0 0 ref $@ and $@->isa('XML::XSH::Internal::SubTerminatingException')
3196 0 0 0 $conditionally && $XML::XSH::Functions::_includes{$f}
3249 0 0 0 ref $@ and $@->isa('XML::XSH::Internal::LoopTerminatingException')
3250 0 0 0 $@->label =~ /^(?:next|redo)$/ and $@->[1] > 1
3393 0 0 0 ref $@ and $@->isa('XML::XSH::Internal::LoopTerminatingException')
3394 0 0 0 $@->label =~ /^(?:next|last|redo|prev)$/ and $@->[1] > 1

or 2 conditions

line l !l condition
275 0 0 get_validation() || '0'
276 0 0 get_recovering() || '0'
277 0 0 get_expand_entities() || '0'
278 0 0 get_expand_xinclude() || '0'
279 0 0 get_keep_blanks() || '0'
280 0 0 get_pedantic_parser() || '0'
281 0 0 get_load_ext_dtd() || '0'
282 0 0 get_complete_attributes() || '0'
283 0 0 get_indent() || '0'
284 0 0 get_empty_tags() || '0'
285 0 0 get_skip_dtd() || '0'
290 0 0 get_cdonopen() || '0'
293 0 0 get_xpath_completion() || '0'
1038 0 0 lc $2 || 'file'
1170 0 0 $xinc{'parse'} ||= 'xml'
1282 0 0 $enc || $XML::XSH::Functions::_xml_module->doc_encoding($doc) || 'utf-8'
1309 0 0 "| $file" || die("Cannot open pipe to $file\n")
1405 0 0 $node->getVersion || '1.0'
1452 0 0 $_[0] || [undef, '.']

or 3 conditions

line l !l&&r !l&&!r condition
110 0 0 0 ref $XML::XSH::Functions::OUT eq 'GLOB' or ref $XML::XSH::Functions::OUT eq 'Term::ReadLine::Gnu::Var'
348 0 0 0 $_[1] || $XML::XSH::Functions::DEFAULT_FORMAT
661 0 0 0 $XML::XSH::Functions::_xml_module->is_text($node) or $XML::XSH::Functions::_xml_module->is_cdata_section($node)
705 0 0 0 $_[0] || $XML::XSH::Functions::LOCAL_NODE || $XML::XSH::Functions::_doc{$XML::XSH::Functions::LOCAL_ID}
743 0 0 0 $l =~ /\G\$\{([a-zA-Z_][a-zA-Z0-9_]*)\}/cogs or $l =~ /\G\$([a-zA-Z_][a-zA-Z0-9_]*)/cogs
945 0 0 0 $result->isa('XML::LibXML::Number') or $result->isa('XML::LibXML::Boolean')
1037 0 0 0 lc $1 || $XML::XSH::Functions::DEFAULT_FORMAT
1047 0 0 0 $id eq '' or $file eq ''
1051 0 0 0 $source ne 'file' or -f $file
0 0 0 $source ne 'file' or -f $file or $file eq '-'
0 0 0 $source ne 'file' or -f $file or $file eq '-' or $file =~ /^[a-z]+:/
1143 0 0 0 $XML::XSH::Functions::_xml_module->is_xinclude_start($node) || $XML::XSH::Functions::_xml_module->is_element($node) && $node->namespaceURI eq 'http://www.w3.org/2001/XInclude' && $node->localname eq 'include'
1164 0 0 0 $XML::XSH::Functions::_xml_module->is_element($node) or $XML::XSH::Functions::_xml_module->is_document($node)
1171 0 0 0 $xinc{'encoding'} ||= $enc
1343 0 0 0 $@ or "$XML::XSH::Functions::QUIET"
1391 0 0 0 $depth > 0 or $folding
1531 0 0 0 $id eq '' or $query eq ''
1677 0 0 0 $XML::XSH::Functions::_xml_module->is_attribute($node) or $XML::XSH::Functions::_xml_module->is_element($node)
0 0 0 $XML::XSH::Functions::_xml_module->is_attribute($node) or $XML::XSH::Functions::_xml_module->is_element($node) or $XML::XSH::Functions::_xml_module->is_pi($node)
1769 0 0 0 $XML::XSH::Functions::_xml_module->is_pi($source) or $XML::XSH::Functions::_xml_module->is_comment($source)
0 0 0 $XML::XSH::Functions::_xml_module->is_pi($source) or $XML::XSH::Functions::_xml_module->is_comment($source) or $XML::XSH::Functions::_xml_module->is_entity_reference($source)
0 0 0 $XML::XSH::Functions::_xml_module->is_pi($source) or $XML::XSH::Functions::_xml_module->is_comment($source) or $XML::XSH::Functions::_xml_module->is_entity_reference($source) or $XML::XSH::Functions::_xml_module->is_document_fragment($source)
1849 0 0 0 $XML::XSH::Functions::_xml_module->is_text($dest) or $XML::XSH::Functions::_xml_module->is_cdata_section($dest)
0 0 0 $XML::XSH::Functions::_xml_module->is_text($dest) or $XML::XSH::Functions::_xml_module->is_cdata_section($dest) or $XML::XSH::Functions::_xml_module->is_comment($dest)
0 0 0 $XML::XSH::Functions::_xml_module->is_text($dest) or $XML::XSH::Functions::_xml_module->is_cdata_section($dest) or $XML::XSH::Functions::_xml_module->is_comment($dest) or $XML::XSH::Functions::_xml_module->is_pi($dest)
0 0 0 $XML::XSH::Functions::_xml_module->is_text($dest) or $XML::XSH::Functions::_xml_module->is_cdata_section($dest) or $XML::XSH::Functions::_xml_module->is_comment($dest) or $XML::XSH::Functions::_xml_module->is_pi($dest) or $XML::XSH::Functions::_xml_module->is_entity_reference($dest)
1851 0 0 0 $XML::XSH::Functions::_xml_module->is_text($node) or $XML::XSH::Functions::_xml_module->is_cdata_section($node)
0 0 0 $XML::XSH::Functions::_xml_module->is_text($node) or $XML::XSH::Functions::_xml_module->is_cdata_section($node) or $XML::XSH::Functions::_xml_module->is_comment($node)
0 0 0 $XML::XSH::Functions::_xml_module->is_text($node) or $XML::XSH::Functions::_xml_module->is_cdata_section($node) or $XML::XSH::Functions::_xml_module->is_comment($node) or $XML::XSH::Functions::_xml_module->is_element($node)
0 0 0 $XML::XSH::Functions::_xml_module->is_text($node) or $XML::XSH::Functions::_xml_module->is_cdata_section($node) or $XML::XSH::Functions::_xml_module->is_comment($node) or $XML::XSH::Functions::_xml_module->is_element($node) or $XML::XSH::Functions::_xml_module->is_pi($node)
1858 0 0 0 $where eq 'replace' or $where eq 'into'
0 0 0 $where eq 'before' or $where eq 'prepend'
0 0 0 $where eq 'after' or $where eq 'append'
1878 0 0 0 $where eq 'replace' or $where eq 'after'
0 0 0 $where eq 'replace' or $where eq 'after' or $where eq 'before'
1913 0 0 0 $XML::XSH::Functions::_xml_module->is_attribute($node) or $XML::XSH::Functions::_xml_module->is_text($node)
0 0 0 $XML::XSH::Functions::_xml_module->is_attribute($node) or $XML::XSH::Functions::_xml_module->is_text($node) or $XML::XSH::Functions::_xml_module->is_cdata_section($node)
1968 0 0 0 $where eq 'into' or $where eq 'append'
0 0 0 $where eq 'into' or $where eq 'append' or $where eq 'prepend'
2002 0 0 0 $where eq 'after' or $where eq 'before'
0 0 0 $where eq 'after' or $where eq 'before' or $where eq 'replace'
0 0 0 $where eq 'into' or $where eq 'append'
2022 0 0 0 $XML::XSH::Functions::_xml_module->is_entity_reference($dest) || $XML::XSH::Functions::_xml_module->is_entity_reference($node)
2114 0 0 0 insert_node($fp, $tp, $tdoc, $where) eq 'remove' || $replace
2144 0 0 0 $exp =~ /\G"((?:[^\\"]|\\.)*)"/cogs or $exp =~ /\G'((?:[^\\']|\\.)*)'/cogs
0 0 0 $exp =~ /\G"((?:[^\\"]|\\.)*)"/cogs or $exp =~ /\G'((?:[^\\']|\\.)*)'/cogs or $exp =~ /\G(.*?\S)(?=\s*[^ \n\r\t=]+=|\s*$)/cogs
2186 0 0 0 $1 eq $ns or $dest->lookupNamespaceURI($1) eq $_->[2]
2307 0 0 0 insert_node($node, $tp, $tdoc, $where) eq 'remove' || $replace
2364 0 0 0 $XML::XSH::Functions::_xml_module->is_text($node) or $XML::XSH::Functions::_xml_module->is_cdata_section($node)
0 0 0 $XML::XSH::Functions::_xml_module->is_text($node) or $XML::XSH::Functions::_xml_module->is_cdata_section($node) or $XML::XSH::Functions::_xml_module->is_comment($node)
0 0 0 $XML::XSH::Functions::_xml_module->is_element($node) or $XML::XSH::Functions::_xml_module->is_document($node)
2387 0 0 0 $XML::XSH::Functions::_xml_module->is_text($child) or $XML::XSH::Functions::_xml_module->is_cdata_section($child)
0 0 0 $XML::XSH::Functions::_xml_module->is_element($child) or $XML::XSH::Functions::_xml_module->is_pi($child)
2407 0 0 0 $XML::XSH::Functions::_xml_module->is_text($child) or $XML::XSH::Functions::_xml_module->is_cdata_section($child)
0 0 0 $XML::XSH::Functions::_xml_module->is_element($child) or $XML::XSH::Functions::_xml_module->is_pi($child)
2610 0 0 0 $id2 eq '' or $id2 eq ''
0 0 0 $id2 eq '' or $id2 eq '' or not ref $doc
3003 0 0 0 ref $xp eq 'ARRAY' and count($xp) or not ref $xp and perl_eval($xp)
0 0 0 not defined $xp or (ref $xp eq 'ARRAY' and count($xp) or not ref $xp and perl_eval($xp))
3015 0 0 0 ref $xp eq 'ARRAY' && count($xp) || !ref($xp) && perl_eval($xp)
3038 0 0 0 -f $stylefile or $stylefile =~ /^[a-z]+:/
3579 0 0 0 ref $_[0] || $_[0]
3625 0 0 0 ref $_[0] || $_[0]