Branch Coverage

blib/lib/App/Iptables2Dot.pm
Criterion Covered Total %
branch 49 54 90.7


line true false branch
105 7 0 if (open my $input, '<', $fname) { }
131 0 0 if ($opt->{'edgelabel'} and $edge->[2])
134 94 5 unless ($edge->[1] =~ /$re_it/)
139 3 96 if ($opt->{'use-numbered-nodes'})
143 86 13 if ($opt->{'showrules'}) { }
144 3 83 if (my $ot = $opt->{'omittargets'}) { }
147 1 2 unless $omit{$edge->[1]}
155 9 4 unless ($seen{$etext}++)
160 7 3 if ($opt->{'showrules'} or $opt->{'edgelabel'}) { }
165 2 7 1 < $seen{$_} ? :
182 8 1 unless ($opt->{'showunusednodes'} or $opt->{'use-numbered-nodes'})
188 41 3 unless $used{$node} or $opt->{'showunusednodes'} or $opt->{'use-numbered-nodes'}
191 47 9 if ($opt->{'showrules'})
200 3 53 if ($opt->{'use-numbered-nodes'}) { }
243 8 1 unless ($opt->{'showunusednodes'} or $opt->{'use-numbered-nodes'})
249 41 3 unless $used{$node} or $opt->{'showunusednodes'} or $opt->{'use-numbered-nodes'}
250 19 37 if (not $have_node{$node} and $node =~ /$re_in/)
251 1 18 if ($opt->{'use-numbered-nodes'}) { }
273 13 261 if $line =~ /^#.*$/
274 12 249 if $line =~ /^COMMIT$/
276 14 235 if ($line =~ /^\*(\S+)$/) { }
108 127 elsif ($line =~ /^:(\S+)\s.+$/) { }
127 0 elsif ($line =~ /^-A\s(\S+)\s(.+)$/) { }
284 94 14 unless ($self->{'nodemap'}{$1})
295 126 1 if ($ret) { }
298 94 32 unless ($target =~ /^(ACCEPT|DROP|REJECT)$/)
299 0 94 unless ($self->{'nodemap'}{$1})