Branch Coverage

blib/lib/IO/Async/SSL.pm
Criterion Covered Total %
branch 52 68 76.4


line true false branch
82 1 1 unless ($args{'SSL_server'} or defined $args{'SSL_verify_mode'} or defined $args{'SSL_ca_file'} or defined $args{'SSL_ca_path'})
84 0 1 unless (%SSL_ca_args)
109 16 264 if ($fh->pending)
122 0 263 unless utf8::downgrade($_[1])
207 0 21 unless $params{'handle'}
211 16 5 if ($params{'handle'}->isa('IO::Async::Stream')) { }
221 0 21 unless my $on_upgraded = delete $params{'on_upgraded'} or defined wantarray
223 0 21 unless my $on_error = delete $params{'on_error'} or defined wantarray
225 6 15 if $on_upgraded
226 6 15 if $on_error
238 0 21 unless (eval { do { $socket = 'IO::Socket::SSL'->start_SSL($socket, _SSL_args('SSL_startHandshake', 0, 'SSL_error_trap', sub { } , %ssl_params)) } })
243 10 11 $ssl_params{'SSL_server'} ? :
247 17 37 if ($socket->$ready_method)
250 15 2 if ($stream)
262 4 33 if ($! != 11 and $! != 11)
275 16 5 if $stream
285 19 2 if defined wantarray
345 1 5 if (exists $params{'on_connected'}) { }
1 4 elsif (exists $params{'on_stream'}) { }
357 0 4 unless defined wantarray
361 0 6 unless my $on_ssl_error = delete $params{'on_ssl_error'} or defined wantarray
368 0 6 unless $stream->isa('IO::Async::Stream')
389 2 4 if $on_done
391 1 0 if defined $_[1] and $_[1] eq 'ssl'
392 3 3 if $on_ssl_error
394 4 2 if defined wantarray
443 0 5 unless my $on_ssl_error = delete $params{'on_ssl_error'} or defined wantarray
456 0 5 unless not defined $stream or $stream->isa('IO::Async::Stream')
462 0 5 unless $socket
464 4 1 if $stream
471 1 0 if ($on_ssl_error)
483 3 2 if defined wantarray
513 0 2 unless my $on_upgraded = delete $params{'on_upgraded'}
515 0 2 unless my $loop = $protocol->get_loop