Branch Coverage

blib/lib/Mojo/Server/Daemon.pm
Criterion Covered Total %
branch 55 76 72.3


line true false branch
24 0 132 if ${^GLOBAL_PHASE} eq "DESTRUCT"
46 4 136 if (my $max = $self->max_clients)
49 1 139 if (my $servers = $self->{'servers'}) { }
138 1 elsif (not @{$self->acceptors;}) { }
82 948 0 unless ($handle->isa("IO::Socket::UNIX"))
86 0 948 if $c->{'tls'}
94 1 947 if (my $error = $req->error)
97 72 876 if ($req->is_handshake) { }
107 2 946 if ($c->{'requests'} || 1) >= $self->max_requests or $req->error
115 772 176 ++$c->{'requests'} > 1 ? :
120 68 170 if (my $tx = $self->{'connections'}{$id}{'tx'})
124 3 1 if $_[0]{'connections'}{$_[1]}{'tx'}
131 56 986 unless my $tx = $c->{'tx'}
132 46 940 if $tx->is_websocket
138 72 868 if (my $ws = delete $c->{'next'})
141 62 10 if ($ws->handshake->res->code == 101) { }
153 27 913 if $tx->error or not $tx->keep_alive
156 1 912 if (length(my $leftovers = $tx->req->content->leftovers))
162 850 63 unless $c->{'tx'}
170 1 1 unless $proto eq "http" or $proto eq "https" or $proto eq "http+unix"
175 0 137 if ($proto eq 'http+unix') { }
177 137 0 if ((my $host = $url->host) ne "*")
178 0 137 if (my $port = $url->port)
183 0 137 if (my $cert = $query->param("cert"))
184 0 137 if (my $key = $query->param("key"))
186 0 137 if defined $ciphers
187 0 137 if defined $verify
188 0 137 if defined $version
200 165 0 if $self
201 0 0 if $self and $self->app->log->error(pop())
207 136 0 if $self->silent
210 0 0 if $url->host eq "*"
211 0 0 unless $options->{'path'} or $url->port
215 0 0 $_[0]->isa('IO::Socket::UNIX') ? :
240 42 2298 if not my $tx = $c->{'tx'} or $c->{'writing'}
244 1003 240 length $chunk ? :
1055 1243 $tx->is_finished ? :
245 240 2058 unless $next