Branch Coverage

blib/lib/Mojo/Server/DaemonControl.pm
Criterion Covered Total %
branch 22 66 33.3


line true false branch
34 15 1 unless my $pid = -r $self->pid_file && $self->pid_file->slurp
36 1 0 if $pid and kill 0, $pid
43 0 1 if -s (my $file = $self->pid_file)
49 0 0 unless my $pid = $self->check_pid
51 0 0 kill('USR2', $pid) ? :
55 0 14 if (my $pid = $self->check_pid)
91 3 0 $ENV{'HARNESS_ACTIVE'} ? :
0 3 $ENV{'HARNESS_IS_VERBOSE'} ? :
94 1 6 if $ENV{'MOJODCTL_LOG_FILE'}
99 1 7 if $ENV{'MOJODCTL_PID_FILE'}
105 0 6 unless $path =~ /\.sock$/u
106 0 6 if -S $path
121 14 14 if $workers < 1
131 0 0 if $w->{$signal}
141 0 0 if (my $signal = $self->{'stop_signal'})
142 0 0 unless keys %$pool
143 0 0 unless $_->{$signal}
148 0 0 if $need > 0
157 0 0 unless my $w = $pool->{$pid}
159 0 0 if (not $w->{'graceful'} and $w->{'time'} + $ht <= $time)
164 0 0 if ($gt and $w->{'graceful'} and $w->{'graceful'} + $gt < $time) { }
0 0 elsif ($w->{'graceful'}) { }
175 0 0 unless $select->can_read("0.1")
176 0 0 unless $self->worker_pipe->sysread(my $chunk, 4194304)
180 0 0 unless my $w = $self->{'pool'}{$1}
181 0 0 if $2 eq "k"
182 0 0 if $2 eq "g"
198 0 0 unless defined(my $pid = fork)
199 0 0 if $pid
213 0 1 unless my $w = delete $self->{'pool'}{$pid}
220 1 8 if $self->{'pid'} and $self->{'pid'} != $$
222 1 7 if $path and -e $path
225 5 3 if $worker_pipe and -S $worker_pipe->hostpath