Branch Coverage

blib/lib/Mojo/IOLoop/Server.pm
Criterion Covered Total %
branch 24 36 66.6


line true false branch
17 115 2 if $self->{'reuse'}
18 116 1 if $self->{'handle'} and $self->reactor
28 145 4 ref $_[0] ? :
36 0 149 $path && $ENV{'MOJO_REUSE'} =~ /(?:^|\,)unix:\Q$path\E:(\d+)/u || $port && $ENV{'MOJO_REUSE'} =~ /(?:^|\,)\Q$address:$port\E:(\d+)/u ? :
43 0 149 $path ? :
44 1 148 if (defined($fd //= $args->{'fd'})) { }
45 0 1 unless $handle = $class->new_from_fd($fd, "r")
53 0 148 if ($path) { }
54 0 0 if -S $path
56 0 0 unless $handle = $class->new(%options)
64 0 148 if $port
67 0 148 unless $handle = $class->new(%options)
72 98 50 length $ENV{'MOJO_REUSE'} ? :
77 1 37 if not "Mojo::IOLoop::TLS"->can_tls and $args->{'tls'}
85 395 0 if ++$self->{'active'}
88 362 91 if delete $_[0]{'active'}
97 188 193 unless my $handle = $self->{'handle'}->accept
103 193 0 unless $args->{'tls'}