Branch Coverage

blib/lib/Graphviz/DSL/Graph.pm
Criterion Covered Total %
branch 64 86 74.4


line true false branch
43 10 37 if (scalar @nodes_or_routes == 1)
49 1 40 unless (defined $end)
54 10 70 ref $_ eq 'ARRAY' ? :
68 1 239 if $node->id eq $id
77 5 6 if (not ref $node) { }
6 0 elsif (ref $node eq 'ARRAY') { }
90 1 1 unless (ref $stuff eq 'HASH')
103 1 6 if ($ref eq 'ARRAY') { }
3 3 elsif ($ref eq 'HASH') { }
109 3 3 if defined $parent
138 1 102 if (ref $node_id eq 'Regexp') { }
140 2 2 if $node->id =~ /$node_id/
143 1 101 if (my $node = $self->_find_same_id_node($node_id)) { }
177 77 230 if ($registered) { }
193 0 0 if ($subgraph->id eq $id)
201 76 591 if ($obj->equal_to($node))
214 0 60 unless (ref $id eq 'ARRAY')
235 5 63 if $edge->equal_to($test_edge)
239 3 57 if (@update_edges) { }
246 77 37 unless $self->_find_object($_id)
264 4 116 if (ref $pattern eq 'Regexp') { }
266 9 19 if ($obj->id =~ /$pattern/)
270 0 28 if (blessed $obj eq 'Graphviz::DSL::Graph')
275 0 4 if (scalar @objects == 0)
279 39 77 if (my $obj = $self->_find_object($pattern))
296 1 2 unless ($type eq 'digraph' or $type eq 'graph')
312 0 0 unless open my $fh, '>', $dotfile
316 0 0 if ($type)
318 0 0 unless (defined $dot)
327 0 0 unless system(@cmd) == 0
334 1 2 unless (@nodes)
339 1 1 unless (grep {$type eq $_;} @types)
349 41 1 unless @{$attrs;}
351 0 1 unless (defined $is_join)
363 0 1 if ($is_join) { }
379 0 3 if ($key eq $old_key)
417 8 1 $$self{'type'} eq 'digraph' ? :
420 1 8 $$self{'is_subgraph'} ? :
423 1 8 if (@{$$self{'graph_attrs'};})
428 0 9 if (@{$$self{'gnode_attrs'};})
433 0 9 if (@{$$self{'gedge_attrs'};})
440 0 41 unless defined $class
458 0 0 if (blessed $obj and $obj->isa('Graphviz::DSL::Graph'))