Branch Coverage

blib/lib/Device/Modbus/Server.pm
Criterion Covered Total %
branch 31 32 96.8


line true false branch
33 3 2 if (ref $unit and $unit->isa('Device::Modbus::Unit')) { }
86 1 4 if ($code == 5 and $value != 65280 and $value != 0) { }
103 4 2 $qty % 8 ? :
105 5 1 if ($bytes == $bytes_qty) { }
128 3 1 if ($bytes == 2 * $qty) { }
151 4 1 if ($bytes == 2 * $write_qty) { }
217 0 15 unless (exists $server->units->{$adu->unit})
222 7 8 if (exists $can_write_zone{$adu->code})
225 6 1 if $resp
247 4 3 ref $match ? :
250 3 4 unless ref $match
271 1 3 if defined $response
310 4 5 ref $match ? :
314 5 4 unless ref $match
323 1 2 unless scalar @vals == $quantity
337 2 2 unless (defined $response)