Branch Coverage

blib/lib/Parse/Eyapp/Node.pm
Criterion Covered Total %
branch 83 190 43.6


line true false branch
45 0 1933 unless UNIVERSAL::can($self, 'children')
46 0 1933 if @_
61 0 128 unless UNIVERSAL::can($self, 'children')
63 0 128 if @_
74 0 1 unless UNIVERSAL::can($self, 'children') and @{$self->{'children'};}
83 0 0 unless UNIVERSAL::can($self, 'children') and @{$self->{'children'};}
102 0 1291 unless UNIVERSAL::can($self, 'child')
103 0 1291 unless defined $index
104 0 1291 if defined $value
116 0 0 unless /\d+/ and $_ < $t->children
160 2 39 ref $_ eq 'CODE' ? :
201 0 0 ref $_ eq 'CODE' ? :
218 0 0 unless (ref $node and UNIVERSAL::can($node, 'children'))
220 0 0 if $p->pattern->($_[0], $_[1], $index, $p)
239 0 0 if $p->pattern->($_[0], $_[1], $index, $p)
268 0 0 if exists $cache{$key}
287 0 0 if ref $_[-1] eq 'CODE'
293 0 0 unless $newnodeclass->isa('Parse::Eyapp::Node')
295 0 0 if (defined $handler and UNIVERSAL::isa($handler, 'CODE'))
313 10 51 if ref $_[0] eq 'CODE'
327 51 500 if (s/\A([A-Za-z_][A-Za-z0-9_:]*)\s*([),])/$1()$2/)
334 0 500 if (s/\A([A-Za-z_][A-Za-z0-9_:]*)\s+([A-Za-z_])/$1()$2/)
341 18 482 if (s/\A([A-Za-z_][A-Za-z0-9_:]*)\s*$/$1()/)
348 152 330 if (s/\A([A-Za-z_][A-Za-z0-9_:]*)//)
356 152 178 if (s/\A[(]//)
366 15 163 if s/\A,//
369 152 11 if (s/\A[)]//)
370 0 152 unless @index
374 0 152 unless defined $class and $class =~ /^[a-zA-Z_][\w:]*$/
385 0 11 unless $_
388 0 11 unless s/\A\s+//
390 0 61 if @index
394 16 128 unless $_->isa('Parse::Eyapp::Node')
397 10 51 if (defined $handler and UNIVERSAL::isa($handler, 'CODE'))
400 2 59 wantarray ? :
434 0 3 unless my(@patterns) = @_
436 0 3 unless $a = &first(sub { not UNIVERSAL::isa($_, 'Parse::Eyapp:YATW'); } , @_)
456 16 65 if $pattern->{'PATTERN'}->($n{'node'})
459 7 20 if (@{$mn->{'patterns'};})
466 4 3 if defined $f
484 3 0 wantarray ? :
560 0 3 unless UNIVERSAL::can($self, 'children') and $self->children > 0
563 3 0 if (ref $child)
566 3 3 if $_ == $child
569 0 3 if ($i == $self->children)
580 0 0 unless $child =~ /\d+/ and $child < $numchildren
597 0 0 unless UNIVERSAL::can($self, 'children')
624 0 2 unless UNIVERSAL::can($self, 'children') and $self->children > 0
628 2 0 if (ref $child)
631 2 4 if $_ == $child
634 0 2 if ($i == $self->children)
645 0 0 unless $child =~ /\d+/ and $child < $numchildren
656 0 0 unless UNIVERSAL::can($self, 'children') and $self->children > 0
660 0 0 if (ref $child)
663 0 0 if $_ == $child
666 0 0 if ($i == $self->children)
677 0 0 unless $child =~ /\d+/ and $child < $numchildren
689 0 1 unless ref $match eq 'CODE' and @_ > 0
697 11 5 if not defined $_ or &$match($_)
737 0 9 unless ref $_[0]
743 9 0 if (defined $DELIMITER and exists $match_del{$DELIMITER}) { }
751 0 9 wantarray ? :
763 0 98 if ($INDENT >= 0 and UNIVERSAL::can($self, 'footnote'))
765 0 0 if $res
770 89 0 if defined $_
776 53 45 if $INDENT >= 0 and UNIVERSAL::can($self, 'info')
777 53 45 if defined $information
778 0 98 if ($INDENT >= 0 and $res)
782 0 98 if ($INDENT > 0) { }
785 0 0 if @children
786 0 0 if $INDENT > 1 and $class =~ tr/\n// > $LINESEP
789 65 33 if @children
800 0 0 if $INDENT >= 0 and $root->can('info')
802 0 0 if defined $information
830 0 0 if ($file) { }
831 0 0 unless $file =~ /\.dot$/
850 0 0 unless defined $file
867 126 245 if (ref $_ eq 'CODE') { }
245 0 elsif (defined $_) { }
879 219 0 if ($type)
880 88 131 if (defined $_[1])
906 0 2 unless @_ > 1
910 0 2 if defined($key = &firstval(sub { not UNIVERSAL::isa($handler{$_}, 'CODE'); } , keys %handler))
921 0 4 unless ref $tree1 eq ref $tree2
926 1 0 if exists $tree1->{$_} and not exists $tree2->{$_}
927 0 0 if exists $tree2->{$_} and not exists $tree1->{$_}
930 0 0 if defined $tree1->{$_} and not defined $tree2->{$_}
931 0 0 if defined $tree2->{$_} and not defined $tree1->{$_}
934 0 0 unless $handler{$_}->($tree1->{$_}, $tree2->{$_})
940 0 3 unless @children1 == @children2
945 0 2 unless _equal($_, $ch2)
1005 0 0 if @_
1013 0 0 if @_
1024 0 0 unless $_->{'NAME'}
1033 0 0 if (UNIVERSAL::can($node, 'info')) { }