Branch Coverage

blib/lib/Device/Modbus/TCP.pm
Criterion Covered Total %
branch 12 20 60.0


line true false branch
20 3 8 unless $bytes
23 0 8 unless $sock->connected
32 42562 7 if (exists $!{'EINTR'} and $!{'EINTR'} or length $msg == 0)
35 0 7 unless (defined $rc)
57 0 2 if (not defined $rc)
62 0 0 if ($_ =~ /timed out/) { }
71 2 0 if $attempts >= 5 or $rc == length $adu->binary_message
86 0 7 unless defined $self->{'buffer'} and length $self->{'buffer'} >= $bytes
93 1 4 if (defined $msg)
95 1 0 if defined $msg->{'unit'}