Branch Coverage

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


line true false branch
24 0 130 if ${^GLOBAL_PHASE} eq "DESTRUCT"
46 4 134 if (my $max = $self->max_clients)
49 1 137 if (my $servers = $self->{'servers'}) { }
136 1 elsif (not @{$self->acceptors;}) { }
82 936 0 unless ($handle->isa("IO::Socket::UNIX"))
86 0 936 if $c->{'tls'}
94 1 935 if (my $error = $req->error)
97 72 864 if ($req->is_handshake) { }
107 2 934 if ($c->{'requests'} || 1) >= $self->max_requests or $req->error
115 761 175 ++$c->{'requests'} > 1 ? :
120 68 169 if (my $tx = $self->{'connections'}{$id}{'tx'})
124 3 1 if $_[0]{'connections'}{$_[1]}{'tx'}
131 56 974 unless my $tx = $c->{'tx'}
132 46 928 if $tx->is_websocket
138 72 856 if (my $ws = delete $c->{'next'})
141 62 10 if ($ws->handshake->res->code == 101) { }
153 27 901 if $tx->error or not $tx->keep_alive
156 1 900 if (length(my $leftovers = $tx->req->content->leftovers))
162 838 63 unless $c->{'tx'}
170 1 1 unless $proto eq "http" or $proto eq "https" or $proto eq "http+unix"
175 0 135 if ($proto eq 'http+unix') { }
177 135 0 if ((my $host = $url->host) ne "*")
178 0 135 if (my $port = $url->port)
183 0 135 if (my $cert = $query->param("cert"))
184 0 135 if (my $key = $query->param("key"))
186 0 135 if defined $ciphers
187 0 135 if defined $verify
188 0 135 if defined $version
200 164 0 if $self
201 0 0 if $self and $self->app->log->error(pop())
207 134 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 2273 if not my $tx = $c->{'tx'} or $c->{'writing'}
244 991 239 length $chunk ? :
1043 1230 $tx->is_finished ? :
245 239 2034 unless $next