Branch Coverage

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


line true false branch
17 141 2 if $self->{'reuse'}
18 139 4 if $self->{'handle'} and $self->reactor
28 175 4 ref $_[0] ? :
36 0 179 $path && $ENV{'MOJO_REUSE'} =~ /(?:^|\,)unix:\Q$path\E:(\d+)/u || $port && $ENV{'MOJO_REUSE'} =~ /(?:^|\,)\Q$address:$port\E:(\d+)/u ? :
43 0 179 $path ? :
44 1 178 if (defined($fd //= $args->{'fd'})) { }
45 0 1 unless $handle = $class->new_from_fd($fd, "r")
53 0 178 if ($path) { }
54 0 0 if -S $path
56 0 0 unless $handle = $class->new(%options)
64 0 178 if $port
67 0 178 unless $handle = $class->new(%options)
72 113 65 length $ENV{'MOJO_REUSE'} ? :
77 1 37 if not "Mojo::IOLoop::TLS"->can_tls and $args->{'tls'}
85 427 0 if ++$self->{'active'}
88 390 102 if delete $_[0]{'active'}
97 230 235 unless my $handle = $self->{'handle'}->accept
103 235 0 unless $args->{'tls'}