Branch Coverage

blib/lib/Net/Server/Proto/SSLEAY.pm
Criterion Covered Total %
branch 76 152 50.0


line true false branch
28 0 3 unless eval { do { require Net::SSLeay; 1 } }
33 0 3 unless eval { do { [3, 4, 2048] } }
53 7 14 if @_
54 7 12 if @_
55 7 12 if @_
56 5 5 if @_
68 0 5 if $ISA[0] eq 'IO::Socket::INET' and 'Net::Server::Proto'->requires_ipv6($server)
76 1 3 defined $server->{'server'}{'listen'} ? :
1 4 defined $info->{'listen'} ? :
78 0 5 if defined $info->{'orig_port'}
83 3 41 $server->can($key) ? :
5 44 defined $ssl->{$key} ? :
1 49 defined $info->{$key} ? :
85 41 9 unless defined $val
86 9 0 if defined $val
89 5 0 wantarray ? :
104 2 0 $host ne '*' ? :
0 0 $ipv eq '4' ? :
0 0 $ipv eq '6' ? :
0 2 $sock->isa('IO::Socket::INET6') ? :
0 2 unless $sock->SUPER::configure({'LocalPort', $port, 'Proto', 'tcp', 'Listen', $lstn, 'ReuseAddr', 1, 'Reuse', 1, $host ne '*' ? ('LocalAddr', $host) : (), $sock->isa('IO::Socket::INET6') ? ('Domain', $ipv eq '6' ? Socket6::AF_INET6() : ($ipv eq '4' ? 2 : 0)) : ()})
114 0 2 if ($port eq '0' and $port = $sock->sockport) { }
0 4 elsif ($port =~ /\D/ and $port = $sock->sockport) { }
130 0 0 unless my $resp = $sock->fdopen($fd, 'w')
132 0 0 if ($sock->isa('IO::Socket::INET6'))
134 0 0 $ipv eq '4' ? :
0 0 $ipv eq '6' ? :
139 0 0 if ($port ne $sock->NS_port)
168 1 0 if ($sock->SSLeay_is_client) { }
180 0 2 if (wantarray) { }
185 2 0 if (defined $client)
194 0 2 wantarray ? :
205 2 7 unless (exists do { *$client }->{'SSLeay'})
206 0 2 unless $client->SSLeay_is_client
211 0 2 unless fcntl $client, 4, $f | 2048
219 2 7 unless defined wantarray
225 0 17 if (my $err = $client->SSLeay_check_error($msg, 1))
237 0 880 if (@err)
239 0 0 $fatal ? :
0 0 if $cb
253 1 0 unless defined $content
258 860 1 if (not length $content) { }
0 1 elsif (defined $bytes and length $content >= $bytes) { }
1 0 elsif (defined $end_qr and $content =~ /$end_qr/g) { }
280 0 861 if $non_greedy and $bytes - length($content) < $n
282 0 861 if ($client->SSLeay_check_error('SSLeay read_until read'))
285 0 0 unless defined $buf or $!{'EAGAIN'} or $!{'EINTR'} or $!{'ENOBUFS'}
286 860 1 unless defined $buf
287 0 1 if (not length $buf) { }
288 0 0 if not length $buf and $n_empty++
292 0 1 if ($non_greedy and length $content == $bytes)
299 1 0 wantarray ? :
305 0 0 defined $buf ? :
311 0 2 unless defined $length
312 0 2 unless defined $offset
316 1 1 if $!{'EAGAIN'} or $!{'EINTR'}
318 0 1 unless defined $data
321 0 1 unless defined $buf
323 0 1 if ($offset > length $$buf)
337 1 0 unless defined $length
338 1 0 unless defined $offset
343 0 1 if $!{'EAGAIN'} or $!{'EINTR'}
344 0 1 if ($write < 0)
364 0 0 if $ok != 1
372 1 1 @_ == 1 ? :
379 0 2 if $client->SSLeay_check_error('SSLeay write')
380 0 0 if ($write == -1 and not $!{'EAGAIN'} and not $!{'EINTR'} and not $!{'ENOBUFS'})
384 2 0 if $write > 0
402 0 0 if @_
409 0 0 if ($whence)
414 0 0 if ($n != $pos)
430 0 3 defined do { *$sock }->{'NS_orig_port'} ? :
444 7 0 $AUTOLOAD =~ /::([^:]+)$/ ? :
445 0 7 unless $prop =~ /^(SSLeay_context|SSLeay_is_client|SSL_\w+)$/
451 15 17 if (@_) { }
453 0 15 if not defined do { *$sock }->{$prop}