Branch Coverage

blib/lib/Parse/Netstat/Search/Sort.pm
Criterion Covered Total %
branch 31 60 51.6


line true false branch
114 0 1 unless ($self->errorblank)
150 0 7 unless ($self->errorblank)
154 0 7 unless (defined $sort)
158 0 7 unless (defined $self->{'sort_check'}{$sort})
181 8 0 if (defined $_[1] and ref $_[1] eq 'ARRAY') { }
193 0 8 unless ($self->errorblank)
198 8 0 if ($self->{'sort'} ne 'none')
199 0 8 if ($self->{'sort'} eq 'host_ff') { }
0 8 elsif ($self->{'sort'} eq 'host_lf') { }
1 7 elsif ($self->{'sort'} eq 'host_f') { }
1 6 elsif ($self->{'sort'} eq 'host_l') { }
0 6 elsif ($self->{'sort'} eq 'port_ff') { }
0 6 elsif ($self->{'sort'} eq 'port_lf') { }
1 5 elsif ($self->{'sort'} eq 'port_f') { }
1 4 elsif ($self->{'sort'} eq 'port_l') { }
1 3 elsif ($self->{'sort'} eq 'state') { }
1 2 elsif ($self->{'sort'} eq 'protocol') { }
0 2 elsif ($self->{'sort'} eq 'q_rf') { }
0 2 elsif ($self->{'sort'} eq 'q_sf') { }
1 1 elsif ($self->{'sort'} eq 'q_r') { }
1 0 elsif ($self->{'sort'} eq 'q_s') { }
203 0 0 unless &host_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_host'})
208 0 0 unless &host_sort_helper($Parse::Netstat::Search::Sort::a->{'local_host'}) <=> &host_sort_helper($Parse::Netstat::Search::Sort::b->{'local_host'})
221 0 0 unless &port_sort_helper($Parse::Netstat::Search::Sort::a->{'foreign_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'foreign_port'})
226 0 0 unless &port_sort_helper($Parse::Netstat::Search::Sort::a->{'local_port'}) <=> &port_sort_helper($Parse::Netstat::Search::Sort::b->{'local_port'})
247 0 0 unless $Parse::Netstat::Search::Sort::a->{'recvq'} <=> $Parse::Netstat::Search::Sort::b->{'recvq'}
252 0 0 unless $Parse::Netstat::Search::Sort::a->{'sendq'} <=> $Parse::Netstat::Search::Sort::b->{'sendq'}
276 0 20 if (not defined $_[0] or $_[0] eq '*')
283 0 20 unless (defined $host)
298 0 20 if (not defined $_[0] or $_[0] eq '*')