Branch Coverage

blib/lib/Farly/Opts/Search.pm
Criterion Covered Total %
branch 29 54 53.7


line true false branch
17 0 6 unless defined $opts
20 0 6 unless ref $opts eq 'HASH'
58 6 0 if (defined $$opts{'id'})
66 6 0 if (defined $$opts{'action'})
68 0 6 unless ($action =~ /permit|deny/)
78 6 0 if (defined $$opts{'p'})
82 0 6 if ($protocol =~ /^\d+$/) { }
6 0 elsif ($protocol =~ /^\S+$/) { }
87 0 6 unless defined $protocol_number
98 0 11 if ($ip =~ /((\d{1,3})((\.)(\d{1,3})){3})\s+((\d{1,3})((\.)(\d{1,3})){3})/) { }
8 3 elsif ($ip =~ m[(\d{1,3}(\.\d{1,3}){3})(/)(\d+)]) { }
2 1 elsif ($ip =~ /((\d{1,3})((\.)(\d{1,3})){3})/) { }
0 1 elsif ($ip =~ /\S+/) { }
110 0 0 if (@addresses) { }
127 6 0 if (defined $$opts{'s'})
136 5 0 if (defined $$opts{'d'})
149 10 0 if ($port =~ /^\d+$/) { }
0 0 elsif ($port =~ /^\S+$/) { }
153 0 0 unless my $port_number = $port_formatter->as_integer($port)
165 5 0 if (defined $$opts{'sport'})
174 5 0 if (defined $$opts{'dport'})
183 0 2 unless my $file = 'IO::File'->new($file_name)
187 0 4 unless $line =~ /\S+/
198 2 3 if (defined $$opts{'exclude-src'})
200 1 1 unless -f $file_name
208 1 3 if (defined $$opts{'exclude-dst'})
210 0 1 unless -f $file_name