Branch Coverage

blib/lib/Lock/Socket.pm
Criterion Covered Total %
branch 46 64 71.8


line true false branch
8 34 0 if not exists $$s{$_}
0 4 if $e{'M'}
16 98 $#_ ? :
0 12 unless $#_ % 2
10 2 unless my $b = $a{'builder'}
2 0 exists $a{'lazy'} ? :
2 0 unless $i
0 0 !exists($_[0]{$n}) ? :
0 0 $#_ ? :
6 6 unless exists $a{'default'}
6 0 'CODE' eq $r ? :
0 6 'ARRAY' eq $r ? :
0 6 'HASH' eq ($r = ref $d) ? :
2 4 exists $a{'lazy'} ? :
2 4 unless $i
28 14 !exists($_[0]{$n}) ? :
0 42 $#_ ? :
4 0 @_ == 1 ? :
0 4 @_ == 2 && !$_[1] ? :
0 12 unless $a{'is'}
0 142 $#_ && $a{'is'} eq 'ro' && caller ne 'Mo::coerce' ? :
1 26 unless (exists $a{$n})
4 8 if ($a{'required'})
48 1 2 if ($token eq 'lock_socket') { }
1 1 elsif ($token eq 'try_lock_socket') { }
53 1 4 defined $addr ? :
67 1 2 defined $addr ? :
72 2 1 if $sock->_is_locked
115 0 19 unless socket my $fh, 2, 1, getprotobyname 'tcp'
145 2 18 if $self->_is_locked
147 6 12 unless bind $self->fh, pack_sockaddr_in($self->port, $self->_inet_addr)
161 1 2 unless $self->_is_locked