Branch Coverage

blib/lib/Toadfarm.pm
Criterion Covered Total %
branch 67 128 52.3


line true false branch
12 0 19 $ENV{'TOADFARM_DEBUG'} ? :
17 0 17 @ARGV && $ARGV[0] =~ /^(reload|start|stop)$/u ? :
18 0 19 if $ENV{'TOADFARM_CONFIG'}
22 1 15 unless grep {/^(-dsl|-init|-test)/u;} @_
37 0 0 @_ == 2 ? :
38 0 1 @_ == 2 ? :
42 4 0 if (@_)
43 4 0 ref $_[0] eq 'ARRAY' ? :
44 4 0 @_ > 1 ? :
4 0 if @_
45 4 0 if $listen
48 1 3 if $app->moniker eq "toadfarm"
50 4 0 if $ENV{'TOADFARM_ACTION'}
53 4 0 unless $ENV{'TOADFARM_INSECURE'}
61 4 15 $ENV{'MOJO_CONFIG'} ? :
67 1 18 if $config->{'log'}{'file'}
68 1 18 if $config->{'paths'}
69 1 18 if $config->{'secret'}
70 1 18 if $config->{'secrets'}
71 2 17 if $config->{'apps'}
72 2 17 if $config->{'tf_plugins'}
73 0 19 if $self->{'root_app'}
80 0 0 if $<
84 0 0 if $ENV{'TOADFARM_ACTION'} eq "test"
89 0 0 if $exit = $? >> 8
98 1 3 if $config->{'hypnotoad'}{'user'}
99 1 2 if $config->{'hypnotoad'}{'group'}
102 1 1 if $> == 0 || $< == 0 and not grep({/\bSetUserGroup$/u;} @$plugins)
105 0 0 if say shift()
138 2 1 if (ref $rules->{'config'} eq "HASH")
152 3 0 unless (ref $app and UNIVERSAL::isa($app, "Mojolicious"))
154 3 0 unless -r $path
155 3 0 if $class =~ /^[\w:]+$/u
156 0 3 unless ref $app
157 0 3 unless $app
160 0 3 if $config->{'log'}{'combined'}
161 0 3 if $config->{'tf'}{'secrets'}
163 2 1 if (ref $rules->{'config'} eq "HASH")
175 1 2 if $name eq "X-Request-Base"
179 3 0 if (@over) { }
0 0 elsif ($mount_point) { }
182 1 2 if $request_base
210 0 2 unless my $paths = $config->{$type}
220 4 0 if -w $dir
228 0 0 $user =~ /^\d+$/u ? :
229 0 0 unless $uid
230 0 0 if $uid == $>
234 0 0 unless -x $sudo[0]
239 0 0 unless @sudo > 1
241 0 0 if $ENV{'TOADFARM_ACTION'} eq "test"
245 0 0 if $exit = $? >> 8
253 4 0 unless $config->{'tf'}{'secrets'}
254 0 4 if $config->{'apps'}
255 1 3 if $config->{'tf_plugins'}
257 0 4 if (my $root_app = delete $app->{'root_app'})
258 0 0 unless $config->{'apps'}
0 0 if (@{[] unless $config->{'apps'};} == 2) { }
260 0 0 if $config->{'hypnotoad'}
261 0 0 if $config->{'tf'}{'logging'}
280 1 0 if $config->{'path'} ||= delete $config->{'file'}
287 3 0 $type eq 'header' ? :
9 3 $type eq 'tx' ? :
289 9 3 if (not defined $value) { }
1 2 elsif (ref $value eq 'Regexp') { }