blib/lib/JIP/LockFile.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
branch | 22 | 28 | 78.5 |
line | true | false | branch |
---|---|---|---|
18 | 1 | 15 | unless (exists $param{'lock_file'}) |
24 | 2 | 13 | unless (length $lock_file) |
77 | 9 | 6 | unless $self->is_locked |
82 | 0 | 6 | unless (unlink $self->lock_file) |
96 | 6 | 3 | $self->is_locked ? : |
101 | 0 | 9 | unless $fh |
108 | 1 | 8 | unless $line |
140 | 0 | 11 | unless ($fh) |
151 | 2 | 8 | if $self->is_locked |
155 | 0 | 8 | unless ($fh) |
159 | 2 | 6 | unless (flock $fh, 6) |
162 | 1 | 1 | if $param{'try'} |
167 | 0 | 6 | unless (truncate $fh, 0) |
175 | 0 | 6 | unless ($fh->print($self->_lock_message)) |