Branch Coverage

blib/lib/IO/Socket/Timeout.pm
Criterion Covered Total %
branch 23 36 63.8


line true false branch
31 0 31 unless defined $socket
33 0 31 unless $socket->isa('IO::Socket')
37 28 3 if (not $ENV{'PERL_IO_SOCKET_TIMEOUT_FORCE_SELECT'} and $osname eq 'darwin' || $osname eq 'linux' || $osname eq 'freebsd') { }
54 13 22 unless (exists $INC{$path})
70 1 9 if ($ENV{'PERL_IO_SOCKET_TIMEOUT_FORCE_SELECT'} or $osname ne 'darwin' and $osname ne 'linux' and $osname ne 'freebsd')
78 14 2 $args_count == 4 ? :
2 15 if $_prevent_deep_recursion or not PerlIO::via::Timeout::has_timeout_layer($_[0]) or not PerlIO::via::Timeout::timeout_enabled($_[0])
95 1 9 if ($ENV{'PERL_IO_SOCKET_TIMEOUT_FORCE_SELECT'} or $osname ne 'darwin' and $osname ne 'linux' and $osname ne 'freebsd')
103 0 0 $args_count == 3 ? :
6 0 $args_count == 4 ? :
0 6 if $_prevent_deep_recursion or not PerlIO::via::Timeout::has_timeout_layer($_[0]) or not PerlIO::via::Timeout::timeout_enabled($_[0])
125 0 41 if grep {$_ < 0;} grep({defined $_;} map({${*$self;}{$_};} 'ReadTimeout', 'WriteTimeout'))
131 21 0 if @_ > 1
137 20 0 if @_ > 1
145 28 0 if @_ > 1
155 69 0 if (${*$self;}{'TimeoutEnabled'}) { }
169 0 69 unless $self->setsockopt(1, 20, $read_struct)
172 0 69 unless $self->setsockopt(1, 21, $write_struct)