Branch Coverage

blib/lib/Mojolicious/Plugin/ForkCart.pm
Criterion Covered Total %
branch 11 62 17.7


line true false branch
24 0 0 if ($caddy->is_alive and $ENV{'HYPNOTOAD_STOP'})
33 0 1 if ($caddy->is_alive and not $ENV{'MOJOLICIOUS_PLUGIN_FORKCART_ADD'}) { }
0 1 elsif ($caddy->is_alive) { }
0 1 elsif ($ARGV[0] and $ARGV[0] =~ /^(daemon|prefork)$/) { }
0 2 elsif ($ENV{'HYPNOTOAD_REV'} and 2 <= $ENV{'HYPNOTOAD_REV'}) { }
69 0 1 if ($ops->{'process'})
84 0 0 unless $app->can('fork_call')
114 0 0 unless system(@cmd) == 0
142 0 0 unless flock $fh, 2
145 0 0 unless seek $fh, 0, 0
150 0 0 unless flock $fh, 8
157 1 2 unless ($state->initialized)
165 0 3 if (-f $state->file)
166 0 0 unless open $fh, '>>', $state->file
172 0 3 if ($hash) { }
0 3 elsif (-f $state->file) { }
215 0 0 if $data->{'shutdown'}
226 3 0 unless -f $caddy->state->file or -s _
228 0 0 $caddy->state->data->{'caddy_pid'} ? :
233 0 0 unless defined $state->data->{'caddy_pid'}
251 0 0 unless sysopen my $fh, $state_file, 194
252 0 0 $ARGV[0] && $ARGV[0] =~ /daemon/ ? :
257 0 0 if ($@ and not $caddy->is_me) { }
0 0 elsif ($@) { }
269 0 0 unless $caddy->is_me
286 0 0 if ++$created == $Mojolicious::Plugin::ForkCart::count
300 0 0 if ($data->{'caddy_pid'} and $$ != $data->{'caddy_pid'})
335 0 0 unless defined(my $pid = CORE::fork)
336 0 0 if ($pid)
363 0 0 if $caddy->state->data->{'shutdown'} or not $caddy->is_alive
378 0 0 if $ret