Branch Coverage

blib/lib/Bison.pm
Criterion Covered Total %
branch 10 108 9.2


line true false branch
113 0 0 if (not defined $$bopts{'ip_address'})
139 0 0 if $_ eq 'from'
140 0 0 if $_ eq 'to'
141 0 0 if $_ eq 'type'
144 0 0 unless ($from and $to)
150 0 0 if ($type)
151 0 0 if ($type eq 'related' or $type eq 'established')
205 0 0 unless (grep {$_ eq $service;} @services)
212 0 0 if $_ eq 'to'
221 0 0 if ($to) { }
244 0 0 if ($args) { }
245 0 0 if (ref $args eq 'ARRAY')
247 0 0 if ($_ == 8)
277 3 0 if ($do eq 'new') { }
0 0 elsif ($do eq 'list') { }
278 0 3 unless (defined $$args{'name'})
285 3 0 if ($args)
287 3 3 if ($_ eq 'jump')
322 0 0 if ($loud)
340 0 2 unless defined $chain
346 1 0 if $_ eq 'prefix'
347 0 1 if $_ eq 'time'
348 0 1 if $_ eq 'duration'
369 0 0 if (%args)
371 0 0 if ($ip_is eq 'static') { }
0 0 elsif ($ip_is eq 'dynamic') { }
414 0 0 if ($what eq 'ports')
417 0 0 if $_ eq 'to'
418 0 0 if $_ eq 'ports'
419 0 0 if $_ eq 'proto'
422 0 0 unless ($to and $ports)
427 0 0 if (not defined $proto or $proto eq 'all') { }
456 0 0 if ($$bopts{'dry'}) { }
485 0 0 if (ref $args eq 'ARRAY') { }
0 0 elsif ($args eq 'local') { }
509 0 0 if (ref $opts eq 'ARRAY') { }
0 0 elsif (ref $opts eq 'SCALAR') { }
0 0 elsif (not defined $opts) { }
522 0 0 unless (grep(($_ eq $opts), ['INPUT', 'OUTPUT', 'FORWARD', 'mangle', 'nat', 'custom']))
531 0 0 if $_ eq '' or undef
533 0 0 if ($item eq 'nat' or $item eq 'mangle') { }
0 0 elsif ($item eq 'custom') { }
534 0 0 if (ipt("-F -t $item")) { }
540 0 0 if (ipt('-X')) { }
547 0 0 if (ipt("-F $item")) { }
553 0 0 if not $errors
560 0 8 if ($$bopts{'debug'})
597 0 0 if (not grep(($_ eq $_), @chains)) { }
601 0 0 if (ipt("-P $_ $policy")) { }
624 0 0 if (@{$$bopts{'errors'};} > 0)
626 0 0 if ($errors > 0) { }
638 0 0 unless (not $$bopts{'verbose'})
647 0 0 if ($file)
648 0 0 unless open my $fh, ">$file"