Branch Coverage

blib/lib/Graph/Traversal.pm
Criterion Covered Total %
branch 93 110 84.5


line true false branch
36 4 1 unless $u eq $v
38 4 1 if (@$path)
41 4 0 if ($i >= 0)
62 1 102 unless ref $g and $g->isa("Graph")
66 1 101 if (exists $attr{'start'})
73 1 0 if exists $attr{'seen_edge'} and $g->multiedged || $g->countedged
74 0 102 if exists $attr{'tree_edge'}
77 1 68 $attr{'next_numeric'} ? :
33 69 $attr{'next_alphabetic'} ? :
79 60 42 unless exists $self->{'next_root'}
82 70 0 exists $self->{'next_root'} ? :
70 32 unless exists $self->{'first_root'}
83 100 2 unless exists $self->{'next_successor'}
84 17 85 if (exists $attr{'has_a_cycle'})
87 0 17 ref $attr{'has_a_cycle'} eq 'CODE' ? :
88 3 14 if $g->is_undirected
90 3 99 if (exists $attr{'find_a_cycle'})
93 0 3 ref $attr{'find_a_cycle'} eq 'CODE' ? :
94 1 2 if $g->is_undirected
118 359 423 unless my $p = $self->{'pre'}
134 65 706 if (my $p = $self->{'post'})
137 762 9 unless my $p = $self->{'post_edge'} and defined(my $u = $self->current)
143 68 693 unless @all
150 647 41 unless defined $nontree or $bdc or defined $seen
155 24 0 if (not $self->{'tree'}->has_edge($u, $v) and defined $nontree || $bdc and exists $self->{'seen'}{$v})
157 3 21 if $nontree
158 24 0 if ($bdc)
160 14 10 if ($back and !defined($postv) || $postv >= $postu) { }
165 1 9 if ($down and $prev > $preu) { }
1 16 elsif ($cross and $prev < $preu) { }
173 57 1 unless $seen
181 8 913 if $self->{'terminate'}
188 518 771 if ($next->size) { }
191 509 9 unless my $p = $self->{'pre_edge'}
197 10 761 if $self->{'terminate'}
200 385 518 unless (@next)
201 105 280 if (not @{$self->{'roots'};} and defined(my $first = $self->{'first_root'}))
202 99 6 ref $first eq 'CODE' ? :
4 101 unless @next = ref $first eq "CODE" ? &$first($self, {map(($_, $_), $self->unseen)}) : $first
206 6 274 unless @next or $self->{'next_root'}
207 111 163 unless @next or @next = $self->{'next_root'}->($self, {map(($_, $_), $self->unseen)})
208 0 264 if $self->{'seen'}->contains($next[0])
211 782 0 if @next
233 373 20 wantarray ? :
238 17 20 wantarray ? :
254 4 7 if $u eq $v
271 4 0 if exists $self->{'postorder'}
276 4 0 if exists $self->{'postordern'}
281 1 0 exists $self->{'postordern'} ? :
286 4 0 if exists $self->{'preorder'}
291 4 0 if exists $self->{'preordern'}
296 1 0 exists $self->{'preordern'} ? :
301 4 1 if exists $self->{'state'}
306 21 1 exists $self->{'state'} ? :
318 1 0 unless keys %{$$self{"state"};}