Branch Coverage

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


line true false branch
24 0 159 if ${^GLOBAL_PHASE} eq "DESTRUCT"
46 4 166 if (my $max = $self->max_clients)
49 1 169 if (my $servers = $self->{'servers'}) { }
168 1 elsif (not @{$self->acceptors;}) { }
82 1014 0 unless ($handle->isa("IO::Socket::UNIX"))
86 0 1014 if $c->{'tls'}
94 1 1013 if (my $error = $req->error)
97 85 929 if ($req->is_handshake) { }
107 2 1012 if ($c->{'requests'} || 1) >= $self->max_requests or $req->error
115 797 217 ++$c->{'requests'} > 1 ? :
120 69 214 if (my $tx = $self->{'connections'}{$id}{'tx'})
124 3 1 if $_[0]{'connections'}{$_[1]}{'tx'}
131 58 1050 unless my $tx = $c->{'tx'}
132 46 1004 if $tx->is_websocket
138 85 919 if (my $ws = delete $c->{'next'})
141 74 11 if ($ws->handshake->res->code == 101) { }
153 44 960 if $tx->error or not $tx->keep_alive
156 1 959 if (length(my $leftovers = $tx->req->content->leftovers))
162 885 75 unless $c->{'tx'}
170 1 1 unless $proto eq "http" or $proto eq "https" or $proto eq "http+unix"
175 0 167 if ($proto eq 'http+unix') { }
177 167 0 if ((my $host = $url->host) ne "*")
178 0 167 if (my $port = $url->port)
183 0 167 if (my $cert = $query->param("cert"))
184 0 167 if (my $key = $query->param("key"))
186 0 167 if defined $ciphers
187 0 167 if defined $verify
188 0 167 if defined $version
200 193 0 if $self
201 0 0 if $self and $self->app->log->error(pop())
207 166 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 43 2452 if not my $tx = $c->{'tx'} or $c->{'writing'}
244 1067 264 length $chunk ? :
1121 1331 $tx->is_finished ? :
245 264 2188 unless $next