Branch Coverage

blib/lib/XML/XPathScript.pm
Criterion Covered Total %
branch 4 176 2.2


line true false branch
92 0 0 unless defined $XML::XPathScript::current
137 0 0 if (@_)
167 0 0 if (my $regex = shift())
192 0 0 unless defined $$self{'printer'}
269 0 0 if (grep {$_ eq 'XML::XPath';} @_) { }
0 0 elsif (grep {$_ eq 'XML::LibXML';} @_) { }
334 0 2 if @_ % 2
339 2 0 if $params{'xml'}
341 0 0 exists $params{'interpolation'} ? :
349 0 0 if ($XML::XPathScript::XML_parser eq 'XML::XPath') { }
360 0 0 if $@
402 0 0 if $xml
404 0 0 if ($stylesheet)
409 0 0 $args ? :
445 0 2 ref $xml ? :
460 0 0 if ($XML::XPathScript::XML_parser eq 'auto')
462 0 0 if (UNIVERSAL::isa($$self{'xml'}, 'XML::XPath')) { }
0 0 elsif (UNIVERSAL::isa($$self{'xml'}, 'XML::LibXML')) { }
474 0 0 if (UNIVERSAL::isa($$self{'xml'}, 'XML::XPath')) { }
0 0 elsif (UNIVERSAL::isa($$self{'xml'}, 'XML::libXML')) { }
476 0 0 if ($XML::XPathScript::XML_parser eq 'XML::XPath' or $XML::XPathScript::XML_parser eq 'auto') { }
488 0 0 if ($XML::XPathScript::XML_parser eq 'XML::LibXML' or $XML::XPathScript::XML_parser eq 'auto') { }
500 0 0 if $XML::XPathScript::XML_parser eq 'auto'
502 0 0 if (ref $$self{'xml'})
504 0 0 $XML::XPathScript::XML_parser eq 'XML::LibXML' ? :
517 0 0 if ($XML::XPathScript::XML_parser eq 'XML::LibXML') { }
518 0 0 if ($xml->isa('XML::LibXML::Document'))
523 0 0 if ($xml->isa('XML::LibXML::Node'))
531 0 0 if ($xml->isa('XML::XPath'))
536 0 0 if ($xml->isa('XML::XPath::Node'))
545 0 0 $XML::XPathScript::XML_parser eq 'XML::LibXML' ? :
558 0 0 if (index($xml, "\n") == -1 and index($xml, '<') == -1 and index($xml, '>') == -1 and -f $xml)
561 0 0 unless open my $fh, '<', $xml
563 0 0 $XML::XPathScript::XML_parser eq 'XML::LibXML' ? :
573 2 0 $XML::XPathScript::XML_parser eq 'XML::LibXML' ? :
594 0 0 if $$self{'stylesheet'}
635 0 0 if (UNIVERSAL::isa($printer, 'SCALAR'))
636 0 0 if $printer
638 0 0 unless $$self{'dom'}
641 0 0 if $XML::XPathScript::XML_parser eq 'XML::LibXML'
650 0 0 if $^V lt v5.7.0
653 0 0 unless $$self{'compiledstylesheet'}
711 0 0 if (-1 == index($token, '<%'))
713 0 0 if -1 < index($tokens[0], '<%') and -1 < index($tokens[0], '-')
721 0 0 if length $token
734 0 0 if -1 < index($t, '<%')
735 0 0 if -1 < index($t, '%>')
736 0 0 if ($level == 0)
743 0 0 unless $closing_tag
748 0 0 if (-1 < index($opening_tag, '=')) { }
0 0 elsif (-1 < index($opening_tag, '~')) { }
0 0 elsif (-1 < index($opening_tag, '#')) { }
0 0 elsif (-1 < index($opening_tag, '@')) { }
761 0 0 unless my $tag = $1
779 0 0 if (-1 < index($closing_tag, '-'))
805 0 0 if ($type eq '<%=') { }
0 0 elsif ($type eq ''
815 0 0 if defined $2
818 0 0 unless $params{'file'}
825 0 0 unless $contents =~ /\G(.*?)%>/cgs
827 0 0 if ($type ne '<%#')
835 0 0 if ($contents =~ /\G(.+)/cgs)
860 0 0 if (ref $stylesheet) { }
903 0 0 unless ($filename =~ m[^\.?/])
909 0 0 $includestack[0] && $includestack[0] =~ m[^\.?/] ? :
918 0 0 if (grep {$_ eq $filename;} @includestack)
925 0 0 unless ($stylesheet = $$self{'stylesheet_cache'}{$filename})
926 0 0 unless open my $fh, '<', $filename
977 0 0 if (exists $$self{'stylesheet'}) { }
0 0 elsif (exists $$self{'stylesheetfile'}) { }
1032 0 0 unless defined $retval
1054 0 0 if (not defined $printer) { }
0 0 elsif (ref $printer eq 'CODE') { }
0 0 elsif (UNIVERSAL::isa($printer, 'SCALAR')) { }
1073 0 0 if $_[1] <= $XML::XPathScript::debug_level
1088 0 0 unless $$self{'compiledstylesheet'}
1134 0 0 if ($XML::XPathScript::XML_parser eq 'XML::XPath') { }
0 0 elsif ($XML::XPathScript::XML_parser eq 'XML::LibXML') { }
1135 0 0 $XML::XPath::VERSION < 1.07 ? :
1155 0 0 if ($uri =~ /^\w\w+:/ and not $uri =~ /^axkit:/) { }
1162 0 0 if (my $E = $@)
1168 0 0 if ($XML::XPathScript::XML_parser eq 'XML::LibXML') { }
0 0 elsif ($XML::XPathScript::XML_parser eq 'XML::XPath') { }
1176 0 0 if ($newdoc)
1177 0 0 if ($XML::XPathScript::XML_parser eq 'XML::LibXML') { }
0 0 elsif ($XML::XPathScript::XML_parser eq 'XML::XPath') { }