Branch Coverage

lib/Graph/Easy/Parser/Graphviz.pm
Criterion Covered Total %
branch 205 284 72.1


line true false branch
333 46 215 if ($name eq 'label')
335 2 44 if $val =~ /^\s*<\s*
337 5 41 if ($html_like == 0 and $val =~ /\s*<(.*)>\s*\z/)
339 2 3 if $val eq ''
347 259 2 if ($html_like == 0) { }
349 12 247 if $v =~ /^
363 0 531 unless defined $name
380 0 12 unless $entities{$1}
659 19 102 if (@{$self->{'scope_stack'};} > 0)
666 19 5 if $t =~ /^_/
668 5 0 unless ref $scope->{$t}
672 7 0 unless $k =~ /^_/
676 109 12 if defined $is_group
700 0 7 if $self->{'debug'}
711 0 6 if $self->{'debug'}
726 0 5 unless defined $scope
728 0 5 if ($scope->{'_is_group'} and @{$self->{'group_stack'};}) { }
730 0 0 if $self->{'debug'}
733 0 5 if $self->{'debug'}
751 0 116 unless defined $scope
753 7 109 if ($scope->{'_is_group'} and @{$self->{'group_stack'};})
755 0 7 if $self->{'debug'}
777 307 21 unless defined $port
780 21 307 if ($port ne '') { }
823 0 97 if @{$self->{'scope_stack'};} > 0
826 1 96 if lc $2 eq 'graph'
835 0 5 if @{$self->{'scope_stack'};} > 0
838 2 3 if lc $2 ne 'di'
858 0 39 unless defined $att
860 25 14 if ($type ne 'graph') { }
864 20 5 unless ref $scope->{$type}
895 0 6 if @{$self->{'stack'};} == 0
900 1 5 if $eg eq '--'
928 179 31 if exists $self->{'scope_stack'}[-1]{'_is_group'}
935 15 16 if (defined $self->{'left_edge'})
946 15 0 if $scope
951 15 0 unless ref $e eq 'ARRAY'
955 15 0 if (ref $a) { }
963 0 0 unless defined $out
969 0 15 if $edge_bd
970 3 12 if $edge_un
984 0 179 if $compass
991 0 179 if $self->{'error'}
1009 0 118 if @{$self->{'stack'};} == 0
1015 1 117 if $compass
1017 8 110 if $eg eq '--'
1051 0 40 if $g->{'name'} eq $name
1056 252 69 unless (defined $node)
1062 0 252 unless defined $scope
1067 231 21 if $is_group
1278 1 18 if ($s =~ /^(triple|double)/)
1297 5 5 if ref $class and not $class->isa('Graph::Easy::Group')
1298 4 0 if not ref $class and defined $class and $class eq 'node'
1303 1 9 if $s eq 'rounded'
1304 1 9 if $s eq 'invis'
1305 2 8 if $s =~ /^(bold|dotted|dashed)\z/
1306 8 2 if ($is_node != 0)
1308 3 5 if $s eq 'filled'
1311 2 8 if ($s =~ /setlinewidth\((\d+|\d*\.\d+)\)/)
1316 0 2 if $width < 3
1317 1 1 if $width >= 3 and $width < 5
1318 1 1 if $width >= 5 and $width < 11
1332 0 0 if $r == 0
1377 0 0 if $cnt < 2
1397 2 0 if $size =~ /^\d+(\.\d+)?\z/
1407 3 0 if $loc =~ /^b/
1417 1 1 if (ref $edge)
1420 1 0 if $dir eq 'back'
1421 0 1 if $dir eq 'both'
1422 0 1 if $dir eq 'none'
1433 1 10 if $style eq 'invis'
1436 0 11 if $style eq 'normal'
1439 6 5 if ($style =~ /setlinewidth\((\d+|\d*\.\d+)\)/)
1443 1 5 if $width < 3
1444 3 3 if $width >= 3 and $width < 5
1445 1 5 if $width >= 5 and $width < 11
1457 0 0 if $shape =~ /^(empty|onormal)\z/
1458 0 0 if $shape eq 'normal' or $shape eq 'normalnormal'
1459 0 0 if $shape eq 'vee' or $shape eq 'veevee'
1460 0 0 if $shape eq 'none' or $shape eq 'nonenone'
1483 3 28 if ($color =~ m[^/])
1493 10 21 if $color =~ /^#/
1496 3 28 if $color =~ /\s/
1497 4 27 if $color =~ /,/
1515 0 10 if (@colors > 1)
1530 3 1 if $l eq 'l'
1531 1 3 if $l eq 'r'
1542 0 183 if ($self->{'debug'})
1544 0 0 if $object
1549 174 9 unless defined $r
1609 0 9 unless $text =~ s/^($qr->{'attribute'})//
1615 1 8 if $name eq 'align'
1616 0 9 unless exists $html_remap->{$tag}{$name}
1618 3 6 if defined $html_remap->{$tag}{$name}
1639 0 3 if $c != 1
1642 0 3 if $r != 1
1644 0 3 if exists $attr->{'port'}
1666 0 2 unless defined $label
1708 0 3 unless defined $1
1726 0 3 unless defined $1
1738 0 3 if ($node_label =~ m[^[ ]*(.*)[ ]*\z]i)
1750 3 0 unless (defined $node)
1762 0 3 if defined $font_face
1773 2 1 if (@rc == 1) { }
1788 1 0 if ($first == 1)
1821 0 102 if $self->{'debug'}
1841 2 257 if ($shape ne 'record' and $label =~ /^<\s*<.*>\z/)
1843 0 2 if $self->{'debug'}
1852 1 1 if $e->{'from'} == $n
1853 1 1 if $e->{'to'} == $n
1859 15 242 if ($shape eq 'record' and $label =~ /\|/)
1864 14 1 if ($n->{'name'} ne $label)
1872 2 13 if ($label =~ /^\s*\{[^\{\}]+\}\s*\z/)
1876 1 1 if $graph_flow =~ /^(east|west)/
1879 1 1 if $graph_flow =~ /^(north|south)/
1898 1 14 if $rc[0]{'att'}{'basename'} eq $rc[0]{'autosplit'}
1902 0 45 if $group
1914 0 0 if $e->{'from'} == $n
1915 0 0 if $e->{'to'} == $n
1940 266 20 unless defined $n->{'_graphviz_portlet'}
1946 1 19 if ($port =~ s/:(n|ne|e|se|s|sw|w|nw)\z//)
1956 20 0 unless (defined $node)
1961 120 206 unless exists $na->{'autosplit_portname'} and exists $na->{'autosplit_basename'}
1962 144 62 unless $na->{'autosplit_basename'} eq $base
1963 43 19 unless $na->{'autosplit_portname'} eq $port
1967 1 18 if $compass
1971 1 19 unless (defined $node)
1975 1 0 if ($port =~ /^(n|ne|e|se|s|sw|w|nw)\z/) { }
1981 4 4 unless exists $na->{'autosplit_basename'}
1982 2 2 unless $na->{'autosplit_basename'} eq $base
1987 0 1 unless (defined $node)
2000 10 10 if ($side eq 'from') { }
2003 0 10 if $self->{'debug'}
2005 0 10 if $self->{'debug'} and $p
2006 1 9 if $p
2011 0 10 if $self->{'debug'}
2013 0 10 if $self->{'debug'} and $p
2014 1 9 if $p
2024 269 21 unless exists $n->{'_graphviz_portlet'}
2029 1 20 unless exists $delete->{$name}
2036 102 0 unless defined $g->raw_attribute('title')
2039 97 5 if ($g->groups == 0)