Branch Coverage

blib/lib/Proc/Govern.pm
Criterion Covered Total %
branch 29 122 23.7


line true false branch
31 0 0 if (@{$h->{'KIDS'};})
33 0 0 if ($self->{'args'}{'killfam'}) { }
48 0 0 if (@{$h->{'KIDS'};})
50 0 0 if ($self->{'args'}{'killfam'}) { }
64 0 0 if $self->{'suspended'}
314 0 1 if (ref $_[0]) { }
323 0 1 if (defined $args{'euid'})
325 0 0 unless ($args{'euid'} =~ /\A[0-9]+\z/)
327 0 0 if @pw
329 0 0 unless $args{'euid'} =~ /\A[0-9]+\z/
332 0 1 if (defined $args{'egid'})
334 0 0 unless ($args{'egid'} =~ /\A[0-9]+( [0-9]+)*\z/)
336 0 0 if @gr
338 0 0 unless $args{'egid'} =~ /\A[0-9]+( [0-9]+)*\z/
343 0 1 if $args{'killfam'}
344 0 1 if $args{'no_screensaver'}
345 0 1 if $args{'no_sleep'}
350 0 1 unless defined $cmd
351 0 1 unless ref $cmd eq 'ARRAY'
354 1 0 unless (defined $name)
357 0 1 unless length $name
359 0 1 unless defined $name
360 0 1 unless $name =~ /\A\w+\z/
363 0 1 if ($args{'single_instance'})
366 0 0 if ('Proc::PID::File'->running('dir', $pid_dir, 'name', $name, 'verify', 1))
367 0 0 if ($args{'on_multiple_instance'} and $args{'on_multiple_instance'} eq 'exit') { }
392 0 1 if ($args{'log_stdout'}) { }
399 0 0 if $showout
406 1 0 if $showout
413 0 1 if ($args{'log_stderr'}) { }
420 0 0 if $showerr
427 0 0 if $showerr
434 1 0 unless $nosleep
436 0 0 unless ($res->[0] == 200)
441 0 0 if ($res->[2])
446 0 0 unless ($res->[0] == 200 or $res->[0] == 304)
455 1 0 unless $prevented_sleep
457 0 0 unless ($res->[0] == 200 or $res->[0] == 304)
472 0 1 if defined $args{'euid'} or defined $args{'egid'}
477 0 1 unless $h = IPC::Run::start($cmd, \*STDIN, $out, $err, $to)
481 0 1 if (defined $args{'nice'})
488 0 1 if defined $args{'euid'} or defined $args{'egid'}
511 0 0 if ($self->{'restart'})
516 0 1 if $args{'restart'}
524 3 0 if (not $self->{'suspended'}) { }
528 1 2 unless ($h->pumpable)
536 0 2 if $everr and not $everr =~ /^IPC::Run: timeout/
542 0 2 if (defined $args{'timeout'})
543 0 0 if ($now - $start_time >= $args{'timeout'})
552 0 0 if ($lw and !$lastlw_time || $lastlw_time <= $now - $lwfreq)
554 0 0 if (not $self->{'suspended'}) { }
556 0 0 if (ref $lwhigh eq 'CODE') { }
563 0 0 if ($is_high)
569 0 0 if (ref $lwlow eq 'CODE') { }
576 0 0 if ($is_low)
586 2 0 unless $noss
587 0 0 unless not $noss_lastprevent_time or $noss_lastprevent_time <= $now - $noss_timeout + 10
590 0 0 unless ($noss_lastprevent_time)
592 0 0 unless ($noss_screensaver)
601 0 0 if ($res->[0] != 200)
612 0 0 if ($res->[0] != 200)