Branch Coverage

blib/lib/Graph/Traversal.pm
Criterion Covered Total %
branch 94 108 87.0


line true false branch
36 4 1 unless $u eq $v
38 4 1 if (@$path)
41 4 0 if ($i >= 0)
62 1 128 unless ref $g and $g->isa("Graph")
66 1 127 if (exists $attr{'start'})
73 1 0 if exists $attr{'seen_edge'} and $g->multiedged || $g->countedged
74 14 114 if exists $attr{'tree_edge'}
77 1 94 $attr{'next_numeric'} ? :
33 95 $attr{'next_alphabetic'} ? :
79 82 46 unless exists $self->{'next_root'}
81 92 36 unless exists $self->{'first_root'}
82 126 2 unless exists $self->{'next_successor'}
83 17 111 if (exists $attr{'has_a_cycle'})
86 0 17 ref $attr{'has_a_cycle'} eq 'CODE' ? :
87 3 14 if $g->is_undirected
89 3 125 if (exists $attr{'find_a_cycle'})
92 0 3 ref $attr{'find_a_cycle'} eq 'CODE' ? :
93 1 2 if $g->is_undirected
117 781 535 unless my $p = $self->{'pre'}
133 65 1239 if (my $p = $self->{'post'})
136 1295 9 unless my $p = $self->{'post_edge'} and defined(my $u = $self->current)
142 73 1221 unless @all
149 661 41 unless defined $nontree or $bdc or defined $seen
154 31339 0 if (not $self->{'tree'}->has_edge($u, $v) and defined $nontree || $bdc and exists $self->{'seen'}{$v})
156 31319 20 if $nontree
157 23 31316 if ($bdc)
159 14 9 if ($back and !defined($postv) || $postv >= $postu) { }
164 1 8 if ($down and $prev > $preu) { }
1 14 elsif ($cross and $prev < $preu) { }
172 32359 1 unless $seen
180 8 1473 if $self->{'terminate'}
187 1018 1304 if ($next->size) { }
190 604 414 unless my $p = $self->{'pre_edge'}
196 10 1294 if $self->{'terminate'}
199 445 1018 unless (@next)
200 131 314 if (not @{$self->{'roots'};} and defined(my $first = $self->{'first_root'}))
201 125 6 ref $first eq 'CODE' ? :
9 122 unless @next = ref $first eq "CODE" ? &$first($self, {map(($_, $_), $self->unseen)}) : $first
205 6 308 unless @next or $self->{'next_root'}
206 132 176 unless @next or @next = $self->{'next_root'}->($self, {map(($_, $_), $self->unseen)})
207 0 298 if not defined $next[0] or $self->{'seen'}->contains($next[0])
210 1316 0 if @next
232 433 20 wantarray ? :
237 17 20 wantarray ? :
253 4 7 if $u eq $v
270 4 0 if exists $self->{'postorder'}
275 4 0 if exists $self->{'postordern'}
280 1 0 exists $self->{'postordern'} ? :
285 4 0 if exists $self->{'preorder'}
290 4 0 if exists $self->{'preordern'}
295 1 0 exists $self->{'preordern'} ? :
300 4 1 if exists $self->{'state'}
305 21 1 exists $self->{'state'} ? :
317 1 0 unless keys %{$$self{"state"};}