Branch Coverage

blib/lib/IPC/Semaphore/Set/Resource.pm
Criterion Covered Total %
branch 24 36 66.6


line true false branch
15 8 0 ref $_[0] ? :
17 0 8 unless defined $args->{'key'}
18 0 8 unless defined $args->{'number'}
19 0 8 unless ref $args->{'semaphore'} eq 'IPC::Semaphore'
21 6 2 unless (defined $args->{'cleanup_object'})
26 0 8 unless (defined $self->value)
36 1 1 if ($self->_lock(IPC_NOWAIT())) { }
54 0 1 unless ($lock)
71 1 0 unless ($lock)
77 2 2 (shift())->_lock(IPC_NOWAIT()) ? :
78 1 0 (shift())->_lock ? :
79 5 0 (shift())->_add_value(IPC_NOWAIT()) ? :
100 5 5 if ($self->semaphore->op($self->number, -1, $flags))
110 5 0 if ($self->semaphore->op($self->number, 1, $flags))
120 2 6 unless $self->{'cleanup_object'}
121 1 5 if (defined $self->{'_locks'})
122 0 1 if ($self->{'_locks'} > 0)
128 0 1 if ($self->{'_locks'} < 0)