Branch Coverage

blib/lib/JIP/LockSocket.pm
Criterion Covered Total %
branch 17 18 94.4


line true false branch
19 1 15 unless exists $param{'port'}
24 2 13 unless defined $port and $port =~ /^\d+$/x
28 1 12 exists $param{'addr'} && length $param{'addr'} ? :
44 1 6 if $self->is_locked
48 1 5 unless bind $socket, pack_sockaddr_in($self->port, $self->_get_inet_addr)
59 1 2 if $self->is_locked
63 1 1 if (bind $socket, pack_sockaddr_in($self->port, $self->_get_inet_addr)) { }
76 9 6 unless $self->is_locked
93 0 8 unless CORE::socket my $socket, 2, 1, getprotobyname 'tcp'