Branch Coverage

blib/lib/Acme/Ghost.pm
Criterion Covered Total %
branch 12 116 10.3


line true false branch
629 2 0 $> == 0 || $< == 0 ? :
638 1 0 @_ > 1 ? :
1 0 @_ ? :
646 0 1 if ($user =~ /^(\d+)$/) { }
0 1 elsif (length $user) { }
652 1 0 unless length $user
657 0 1 if ($group =~ /^(\d+)$/) { }
0 1 elsif (length $group) { }
664 1 0 unless length $group
667 0 1 unless $name
729 0 0 unless defined $uid
732 0 0 unless POSIX::setuid($uid)
733 0 0 if ($< != $uid or $> != $uid)
735 0 0 if ($< != $uid)
746 0 0 unless defined $gids
751 0 0 unless POSIX::setgid($gid)
752 0 0 unless (grep {$gid == $_;} split(/\s+/, $(, 0))
761 0 0 if $self->{'daemonized'}
765 0 0 if (my $runned = $self->filepid->running)
784 0 0 if ($pid)
786 0 0 if ($safe)
796 0 0 if -e $pid_file
803 0 0 if POSIX::setsid() < 0
812 0 0 unless open STDIN, "<", $devnull
813 0 0 unless open STDOUT, ">", $devnull
814 0 0 unless open STDERR, ">&", "STDOUT"
820 0 0 unless (chdir $rootdir)
834 0 0 if $self->is_spirited
867 0 0 unless defined $self->{'ppid'}
868 0 0 $self->{'ok'} ? :
881 0 0 if ($self->{'interrupt'} >= 3)
882 0 0 if $self->is_spirited
893 0 0 unless $self->is_daemonized
910 0 0 unless $pid
918 0 0 unless ($self->filepid->running)
924 0 0 if $tsig
926 0 0 if ($tsig)
927 0 0 if ($tsig == 9)
944 0 0 if $runned and $runned < 0
952 0 0 unless $self->pid
960 0 0 unless (grep {$cmd eq $_;} @{["start","stop","reload","restart","status"];})
965 0 0 if ($cmd eq 'start') { }
0 0 elsif ($cmd eq 'status') { }
0 0 elsif ($cmd eq 'stop') { }
0 0 elsif ($cmd eq 'restart') { }
0 0 elsif ($cmd eq 'reload') { }
969 0 0 if (my $runned = $self->status) { }
975 0 0 if (my $runned = $self->stop) { }
976 0 0 if ($runned < 0) { }
987 0 0 if ($exit_code) { }
1001 0 1 unless $self
1002 1 0 unless $self->{'daemonized'}
1003 0 0 if $self->{'spirited'}
1020 0 0 unless POSIX::sigprocmask(0, $sigset)
1024 0 0 if (defined $lpid)
1026 0 0 unless POSIX::sigprocmask(1, $sigset)
1029 0 0 if ($loop < 6 and $! == 11 || $! == 12)
1040 0 0 scalar @_ == 1 ? :