Branch Coverage

web/cgi-bin/yatt.lib/YATT/LRXML/NodeCursor.pm
Criterion Covered Total %
branch 70 114 61.4


line true false branch
54 1177 2130 unless defined $path->{'cf_index'} and $path->{'cf_index'} <= $#{$$path{'cf_array'};}
57 1439 691 if (not defined $path->{'cur_postype'} or $path->{'cur_postype'} == 1)
59 604 835 ref $val && node_type($val) == 7 ? :
67 226 301 unless defined $path->{'prev_postype'}
68 0 301 unless $path->{'cur_postype'} == 2
88 6 0 $path ? :
104 119 133 if (@_) { }
138 0 11 $primary_only ? :
141 18 1 if ($node->is_attribute) { }
142 18 0 ref $filter eq 'ARRAY' ? :
148 8 11 if @node
166 0 0 $all ? :
169 0 0 if ($orig->is_attribute and @name = $orig->node_path and $$hash{$name[0]})
186 0 0 if (defined $name) { }
207 114 5 delete $opts{'primary_only'} ? :
208 0 119 if %opts
212 7 102 if ($node->is_attribute and defined($name = $node->node_name) and exists $except->{$name}) { }
219 0 7 if (defined $except->{$name}) { }
236 6 591 if (not defined(my YATT::LRXML::NodeCursor::Path $path = $self->{'cf_path'})) { }
0 591 elsif (not defined($obj = $path->{'cf_array'}[$path->{'cf_index'}]) or ref $obj ne 'ARRAY') { }
251 0 0 if (not defined(my YATT::LRXML::NodeCursor::Path $path = $self->{'cf_path'})) { }
255 0 0 unless defined $obj and ref $obj eq 'ARRAY'
264 6 0 if defined $obj
269 3 0 if (my YATT::LRXML::NodeCursor::Path $parent = $self->{'cf_path'}->parent) { }
298 0 7394 unless defined $self->{'cf_path'}
307 0 89 unless defined $self->{'cf_path'}
318 84 4809 unless $cursor->readable
319 4015 794 if (ref(my $value = $cursor->current)) { }
331 0 18 unless defined(my $meta = $cursor->{'cf_metainfo'})
339 0 0 if (my YATT::LRXML::NodeCursor::Path $path = $self->{'cf_path'})
347 7296 0 if defined $self->{'cf_path'}
353 0 0 if (not defined $self->{'cf_path'}) { }
363 0 156 if (not defined(my YATT::LRXML::NodeCursor::Path $path = $self->{'cf_path'})) { }
373 6 2 if (not defined(my YATT::LRXML::NodeCursor::Path $path = $self->{'cf_path'})) { }
0 2 elsif (not defined(my $obj = $path->{'cf_array'}[$path->{'cf_index'}])) { }
2 0 elsif (ref $obj) { }
386 0 211 unless defined(my YATT::LRXML::NodeCursor::Path $path = $self->{'cf_path'})
424 3 463 unless defined $item
426 152 311 if (ref $item) { }
438 0 527 unless my YATT::LRXML::NodeCursor::Path $path = $self->{'cf_path'}
444 0 294 unless my YATT::LRXML::NodeCursor::Path $path = $self->{'cf_path'}
445 0 294 unless defined $path->{'cf_index'}
454 9 19 if (not defined $path) { }
19 0 elsif (ref(my $value = $path->current)) { }
466 0 0 if (not defined $path) { }
476 6 0 if (my YATT::LRXML::NodeCursor::Path $path = $self->{'cf_path'})
483 0 6 wantarray ? :
489 130 109 if (not defined $head) { }
109 0 elsif ($head =~ s[^(\w+((?:\:\w+)*))?(?:([|/?!])(.*))?][]s) { }
493 3 106 $1 && $2 ? :
2 11 defined $4 ? :
13 96 @rest ? :
503 0 6 unless my YATT::LRXML::NodeCursor::Path $path = $self->{'cf_path'}
505 4 2 if $next >= @{$path->{'cf_array'};}
507 0 2 unless defined $item
508 1 1 unless ref $item
523 0 0 if (ref $_[0]) { }