| blib/lib/IPC/Lock/WithTTL.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| branch | 21 | 26 | 80.7 |
| line | true | false | branch |
|---|---|---|---|
| 37 | 5 | 12 | unless ($self->{'_fh'}) |
| 38 | 0 | 5 | unless open $self->{'_fh'}, '+>>', $self->file |
| 48 | 0 | 9 | if $ttl |
| 51 | 0 | 9 | unless flock $fh, 2 |
| 62 | 5 | 4 | if ($pid == 0) { } |
| 2 | 2 | elsif ($pid != $$) { } | |
| 64 | 4 | 1 | if ($now >= $expiration) { } |
| 74 | 1 | 1 | if ($now >= $expiration) { } |
| 78 | 0 | 1 | if ($self->kill_old_proc and $pid > 0) |
| 88 | 1 | 1 | if ($now >= $expiration) { } |
| 100 | 7 | 2 | if ($acquired) { } |
| 101 | 6 | 1 | wantarray ? : |
| 104 | 2 | 0 | wantarray ? : |