Branch Coverage

blib/lib/IPC/Locker.pm
Criterion Covered Total %
branch 68 148 45.9


line true false branch
268 0 6 unless @_ >= 1
286 0 0 if $self->{'verbose'}
287 0 0 if $self->{'verbose'}
288 0 0 if $self->{'verbose'}
289 0 0 if $self->{'verbose'}
297 0 6 if $_ =~ /\s/
300 0 6 if $IPC::Locker::Debug
315 0 21 unless $self and ref $self
316 9 12 if $self->{'locked'}
323 1 0 if ($res->{'ok'}) { }
333 0 1 unless ref $self
342 0 1 if (not $ok) { }
354 3 5 unless ref $self
355 6 2 unless ($self->locked)
357 0 6 if $self->{'error'}
359 6 2 if $self->{'locked'}
367 0 6 unless $self and ref $self
368 6 0 if ($self->{'destroy_unlock'} and $self->{'pid'} and $self->{'pid'} == $$)
374 0 8 unless $self and ref $self
375 4 4 if ($self->locked)
377 0 4 if $self->{'error'}
383 0 0 unless $self
384 0 0 unless ref $self
386 0 0 if $self->{'error'}
391 0 0 unless ref $self
397 0 0 if $self->{'error'}
405 0 1 unless $self
406 0 1 unless ref $self
408 0 1 if $self->{'error'}
409 0 1 if $IPC::Locker::Debug
414 0 2 unless $self
415 0 2 if (ref $self->{'lock'} and $#{$$self{'lock'};} < 1) { }
425 0 1 unless ref $self
427 0 1 if $self->{'error'}
440 13 0 if ($self->{'family'} eq 'INET')
442 13 0 unless ref $self->{'host'}
443 0 13 if ref $self->{'host'} eq 'ARRAY'
449 0 13 if ($tries > 0)
451 0 0 if $IPC::Locker::Debug
457 13 0 if ($ok)
458 0 13 if ($host ne $hostlist[0])
468 0 13 unless ($ok)
469 0 0 if (defined $self->{'print_down'})
474 0 0 $self->{'family'} eq 'INET' ? :
479 0 13 if $IPC::Locker::Debug
501 9 4 if $cmd ne 'UNLOCK'
505 2 11 if $self->{'autounlock'} and $cmd ne 'UNLOCK'
509 0 13 if $IPC::Locker::Debug
512 13 0 if ($self->{'family'} eq 'INET') { }
0 0 elsif ($self->{'family'} eq 'UNIX') { }
513 0 13 if $IPC::Locker::Debug
518 0 0 if $IPC::Locker::Debug
524 0 13 unless $fh
531 24 28 if $line =~ /^\s*$/
534 0 28 if $IPC::Locker::Debug
535 11 17 if $cmd eq 'locked'
536 11 17 if $cmd eq 'owner'
537 0 28 if $cmd eq 'error'
538 5 23 if ($cmd eq 'lockname')
540 5 0 if $#{$$self{'lock'};} < 1
542 1 27 if ($cmd eq 'lock' and @args == 2)
545 0 28 if ($cmd eq 'autounlock_check')
548 0 0 if ($self->{'hostname'} eq $lhost)
549 0 0 if (IPC::PidStat::local_pid_doesnt_exist($lpid))
550 0 0 if $IPC::Locker::Debug
551 0 0 if ($supports_dead) { }
561 0 28 if $cmd eq 'print_obtained'
562 0 28 if $cmd eq 'print_waiting'
563 0 28 if $cmd eq 'print_broke'
564 0 0 if $line =~ /^ECHO\s+(.*)$/ and $self->{'verbose'}
579 1 12 unless (defined $_Tcp_Proto)
580 0 1 unless $_Tcp_Proto = getprotobyname 'tcp'
587 9 10 unless ref $_[0]
593 0 0 unless ref $item