Branch Coverage

blib/lib/Lock/Socket.pm
Criterion Covered Total %
branch 50 70 71.4


line true false branch
8 34 0 if not exists $$s{$_}
0 4 if $e{'M'}
16 97 $#_ ? :
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'}
4 2 '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 141 $#_ && $a{'is'} eq 'ro' && caller ne 'Mo::coerce' ? :
1 28 unless (exists $a{$n})
4 8 if ($a{'required'})
43 0 0 unless $^O =~ /bsd$/ or $^O eq 'darwin'
53 2 6 defined $addr ? :
75 1 3 unless $_[0]
80 1 0 unless $_[0]
90 1 4 if ($token eq 'lock_socket') { }
1 3 elsif ($token eq 'try_lock_socket') { }
1 2 elsif ($token eq 'lock_user_socket') { }
1 1 elsif ($token eq 'try_lock_user_socket') { }
138 0 19 unless socket my $fh, 2, 1, getprotobyname 'tcp'
168 2 18 if $self->_is_locked
170 6 12 unless bind $self->fh, pack_sockaddr_in($self->port, $self->_inet_addr)
184 1 2 unless $self->_is_locked