Branch Coverage

blib/lib/Net/Connection.pm
Criterion Covered Total %
branch 33 66 50.0


line true false branch
205 16 0 if (defined $_[1])
210 2 9 unless (defined $args{'foreign_host'} and defined $args{'local_host'} and defined $args{'foreign_port'} and defined $args{'local_port'} and defined $args{'state'} and defined $args{'proto'})
222 1 8 if (defined $args{'pid'} and not $args{'pid'} =~ /^[0-9]+$/)
230 1 7 if (defined $args{'uid'} and not $args{'uid'} =~ /^[0-9]+$/)
238 1 6 if (defined $args{'sendq'} and not $args{'sendq'} =~ /^[0-9]+$/)
244 1 5 if (defined $args{'recvq'} and not $args{'recvq'} =~ /^[0-9]+$/)
271 5 0 if (defined $args{'sendq'})
274 5 0 if (defined $args{'recvq'})
277 0 5 if (defined $args{'local_ptr'})
280 0 5 if (defined $args{'foreign_ptr'})
283 2 3 if (defined $args{'uid'})
286 4 1 if (defined $args{'pid'})
289 1 4 if (defined $args{'username'})
294 0 5 if ($args{'ports'}) { }
296 0 0 if ($self->{'local_port'} =~ /[A-Za-z]/) { }
0 0 elsif ($self->{'local_port'} =~ /^[0-9]+$/) { }
299 0 0 if (defined $service)
305 0 0 if ($self->{'foreign_port'} =~ /[A-Za-z]/) { }
0 0 elsif ($self->{'foreign_port'} =~ /^[0-9]+$/) { }
308 0 0 if (defined $service)
316 0 5 if ($self->{'local_port'} =~ /[A-Za-z]/)
319 0 5 if ($self->{'foreign_port'} =~ /[A-Za-z]/)
327 0 5 if (defined $args{'ptrs'} and $args{'ptrs'}) { }
332 0 0 if ($self->{'foreign_host'} =~ /[A-Za-z]/ and not $self->{'foreign_host'} =~ /\:/) { }
342 0 0 if (defined $answer->{'answer'}[0] and ref $answer->{'answer'}[0] eq 'Net::DNS::RR::PTR')
350 0 0 if ($self->{'local_host'} =~ /[A-Za-z]/ and not $self->{'local_host'} =~ /\:/) { }
360 0 0 if (defined $answer->{'answer'}[0] and ref $answer->{'answer'}[0] eq 'Net::DNS::RR::PTR')
370 0 5 if ($self->{'foreign_host'} =~ /[A-Za-z]/ and not $self->{'foreign_host'} =~ /\:/)
376 0 5 if ($self->{'local_host'} =~ /[A-Za-z]/ and not $self->{'local_host'} =~ /\:/)
385 1 4 if ($args{'uid_resolve'} and defined $self->{'uid'}) { }
1 6 elsif ($args{'uid_resolve'} and not defined $self->{'uid'}) { }
391 1 0 if (defined $pwline[0])
401 1 0 if (defined $pwline[2])