Branch Coverage

blib/lib/XML/Reader.pm
Criterion Covered Total %
branch 3 252 1.1


line true false branch
29 0 0 if ($sub eq 'XML::Parser' or $sub eq 'XML::Parsepp') { }
30 0 0 if (defined $act_module)
48 0 1 if (defined $mod) { }
49 0 0 if ($mod eq 'XML::Parser') { }
0 0 elsif ($mod eq 'XML::Parsepp') { }
62 1 0 if ($@)
65 0 1 if ($@)
88 0 0 if defined $_[1]
90 0 0 if (defined $opt{'mode'})
92 0 0 if ($opt{'mode'} eq 'attr-bef-start') { }
0 0 elsif ($opt{'mode'} eq 'attr-in-hash') { }
0 0 elsif ($opt{'mode'} eq 'pyx') { }
0 0 elsif ($opt{'mode'} eq 'branches') { }
100 0 0 if (defined $opt{'filter'}) { }
101 0 0 unless ($opt{'filter'} eq $flt)
110 0 0 unless defined $opt{'strip'}
111 0 0 unless defined $opt{'filter'}
112 0 0 unless defined $opt{'parse_pi'}
113 0 0 unless defined $opt{'parse_ct'}
115 0 0 unless ($opt{'filter'} == 2 or $opt{'filter'} == 3 or $opt{'filter'} == 4 or $opt{'filter'} == 5)
121 0 0 if (defined $opt{'dupatt'} and $opt{'dupatt'} ne '')
122 0 0 unless ($use_module eq 'XML::Parsepp')
128 0 0 unless my $XmlParser = $use_module->new(@parser_opt)
152 0 0 if (ref $_[0] eq 'GLOB') { }
156 0 0 if ($_[0] =~ /\A https?:/msx) { }
157 0 0 unless $fh = 'Acme::HTTP'->new($_[0])
161 0 0 unless open $fh, '<', $_[0]
211 0 0 $opt{'filter'} == 3 ? :
0 0 $opt{'filter'} == 4 || $opt{'filter'} == 5 ? :
0 0 unless $self->{'ExpatNB'} = $XmlParser->parse_start('XR_Data', [], 'XR_Text', '', 'XR_Comment', '', 'XR_fh', $fh, 'XR_Att', [], 'XR_ProcInst', [], 'XR_Decl', {}, 'XR_Prv_SPECD', '', 'XR_Emit_attr', $opt{'filter'} == 3 ? 0 : 1, 'XR_Split_up', $opt{'filter'} == 4 || $opt{'filter'} == 5 ? 1 : 0, 'XR_Strip', $opt{'strip'}, 'XR_ParseInst', $opt{'parse_pi'}, 'XR_ParseComm', $opt{'parse_ct'})
216 0 0 if (exists $opt{'debug'})
225 0 0 defined $opt{'sepchar'} ? :
227 0 0 ref $opt{'using'} ? :
0 0 !defined($opt{'using'}) ? :
244 0 0 if ($self->{'filter'} == 5)
248 0 0 if (ref $object->{'branch'} eq 'ARRAY')
263 0 0 if ($ele =~ /\[ \@ ([^\[\]=\s]+) = ['"] ([^'"]*) ['"] \]/msx)
280 0 0 if ($ele =~ /\[ \@ ([^\[\]=\s]+) = ['"] ([^'"]*) ['"] \]/msx)
285 0 0 if ($object->{'root'} =~ m[\A // ([^/] .*) \z]msx or $object->{'root'} =~ m[\A ([^/] .*) \z]msx) { }
348 0 0 if ($_[0]{'filter'} == 5) { }
349 0 0 ref $_[0]{'rvalue'} eq 'ARRAY' ? :
385 0 0 if ($self->{'filter'} == 5)
387 0 0 if ($res)
395 0 0 unless (defined $token)
399 0 0 if ($token->found_start_tag)
405 0 0 if ($token->found_end_tag)
417 0 0 if ($token->found_text) { }
0 0 elsif ($token->found_attr) { }
423 0 0 if (@{$token->extract_proc;} == 2)
428 0 0 $prv_SPECD eq 'D' ? :
429 0 0 $prv_SPECD eq 'S' ? :
430 0 0 $prv_SPECD eq 'P' ? :
431 0 0 $prv_SPECD eq 'C' ? :
432 0 0 $nxt_SPECD eq 'E' ? :
444 0 0 @{$self->{'plist'};} ? :
489 0 0 if ($self->{'filter'} == 4 or $self->{'filter'} == 5) { }
490 0 0 if ($self->{'type'} eq '@') { }
0 0 elsif ($self->{'is_decl'}) { }
0 0 elsif ($self->{'is_proc'}) { }
0 0 elsif ($self->{'is_start'}) { }
0 0 elsif ($self->{'is_end'}) { }
0 0 elsif ($self->{'is_comment'}) { }
503 0 0 $self->{'type'} eq 'T' ? :
509 0 0 $self->{'is_text'} || $self->{'is_attr'} ? :
512 0 0 if ($self->{'filter'} == 5)
522 0 0 if (defined $param->{'root'}) { }
0 0 elsif (defined $param->{'qrfix'}) { }
0 0 elsif (defined $param->{'qr1'}) { }
529 0 0 if ($self->{'path'} =~ /$param->{'qr1'}/)
536 0 0 if (defined $root)
537 0 0 if ($root eq '/') { }
538 0 0 if (@{$self->{'plist'};} == 1) { }
0 0 elsif (@{$self->{'plist'};} > 1) { }
548 0 0 if ($self->{'path'} eq $root) { }
0 0 elsif (substr($self->{'path'}, 0, length($root) + 1) eq $root . '/') { }
559 0 0 unless defined $twig
578 0 0 unless ($e)
586 0 0 unless (defined $v)
592 0 0 unless ($v eq $val)
601 0 0 if $block
605 0 0 if ($root eq '/') { }
612 0 0 if (ref $param->{'branch'}) { }
0 0 elsif ($param->{'branch'} eq '+') { }
0 0 elsif ($param->{'branch'} eq '*') { }
613 0 0 if ($border and $self->{'is_start'})
617 0 0 if ($self->{'is_value'})
619 0 0 if ($param->{'branch'}[$i] eq $twig)
638 0 0 unless ($e)
646 0 0 unless (defined $v)
652 0 0 unless ($v eq $val)
661 0 0 unless ($block)
663 0 0 defined $$ref ? :
670 0 0 if ($border and $self->{'is_start'})
676 0 0 if ($border and $self->{'is_start'})
681 0 0 if ($self->{'is_decl'})
693 0 0 if ($self->{'is_start'})
705 0 0 if ($self->{'is_proc'})
716 0 0 if ($self->{'is_text'})
718 0 0 if ($tval ne '')
725 0 0 if ($self->{'is_comment'})
732 0 0 if ($self->{'is_end'})
739 0 0 if ($border and $self->{'is_end'})
751 0 0 if ($check eq $self->{'path'})
758 0 0 if ($check . '/' eq substr($self->{'path'}, 0, length($check) + 1))
768 0 0 if (@{$self->{'using'};} and $self->{'prefix'} eq '')
784 0 0 if (ref $self->NB_fh eq 'Acme::HTTP') { }
786 0 0 unless $ct
793 0 0 if $buf eq ''
813 0 0 unless (@{$self->NB_data;})
823 0 0 unless $ExpatNB->{'XR_ParseInst'}
826 0 0 defined $ver ? :
0 0 defined $encoding ? :
0 0 $standalone ? :
0 0 defined $standalone ? :
835 0 0 unless $ExpatNB->{'XR_ParseInst'}
844 0 0 unless $ExpatNB->{'XR_ParseComm'}
879 0 0 if ($ExpatNB->{'XR_Strip'})
888 0 0 unless ($ExpatNB->{'XR_Prv_SPECD'} eq '')
895 0 0 if ($ExpatNB->{'XR_Split_up'}) { }
896 0 0 if ($prev_SPECD ne 'E')
902 0 0 if ($ExpatNB->{'XR_Emit_attr'})
911 0 0 unless ($text eq '')
916 0 0 if ($next_SPECD eq 'E')
926 0 0 if ($ExpatNB->{'XR_Emit_attr'})
977 0 0 if ($self->{'ExpatNB'})
989 0 0 if (defined $r->{'dupatt'}) { }