| line |
true |
false |
branch |
|
24
|
1 |
1 |
if (@_ == 1) { } |
|
31
|
0 |
2 |
unless (exists $args{'path'}) |
|
36
|
1 |
1 |
unless exists $args{'project'} |
|
37
|
1 |
1 |
unless exists $args{'count'} |
|
38
|
1 |
1 |
unless exists $args{'value'} |
|
39
|
1 |
1 |
unless exists $args{'touch'} |
|
44
|
0 |
0 |
if not -e $$self{'_args'}{'path'} or $$self{'_args'}{'touch'} or return undef |
|
45
|
0 |
2 |
unless $$self{'_args'}{'key'} = $self->_ftok |
|
47
|
0 |
2 |
unless $$self{'_args'}{'sem'} = $self->_create($self->key) |
|
57
|
0 |
2 |
unless sysopen my $fh, $path, 2369 |
|
58
|
2 |
0 |
if $$self{'_args'}{'touch'} |
|
59
|
0 |
2 |
unless close $fh |
|
66
|
0 |
0 |
unless return ftok($$self{'_args'}{'path'}, $$self{'_args'}{'project'}) |
|
75
|
2 |
0 |
unless (defined $sem) |
|
78
|
0 |
2 |
if (not defined $sem) { } |
|
80
|
0 |
0 |
unless $sem = 'IPC::Semaphore'->new($key, 0, 0) |
|
101
|
0 |
0 |
unless my $nsem = shift() |
|
107
|
0 |
0 |
unless my $nsem = shift() |
|
141
|
0 |
0 |
if (@_ >= 1 and $_[0] =~ /^\d+$/) { } |
|
148
|
0 |
0 |
unless defined $args{'sem'} |
|
149
|
0 |
0 |
unless defined $args{'wait'} |
|
150
|
0 |
0 |
unless defined $args{'max'} |
|
151
|
0 |
0 |
unless defined $args{'undo'} |
|
155
|
0 |
0 |
if $args{'undo'} |
|
159
|
0 |
0 |
if $args{'wait'} |
|
161
|
0 |
0 |
if ($ret = $sem->op($args{'sem'}, -1, $flags)) { } |
|
|
0 |
0 |
elsif ($args{'wait'}) { } |
|
164
|
0 |
0 |
if $args{'max'} >= 0 and $ncnt >= $args{'max'} |