Branch Coverage

blib/lib/Device/Modbus/Response.pm
Criterion Covered Total %
branch 26 26 100.0


line true false branch
49 1 26 unless $args{'function'} or $args{'code'}
51 17 26 if ($args{'function'}) { }
53 1 16 unless exists $Device::Modbus::code_for{$args{'function'}}
58 1 25 unless exists $Device::Modbus::function_for{$args{'code'}}
66 20 103 if $_ eq 'bytes'
70 2 101 unless exists $args{$_}
76 2 7 unless (@{$args{'values'};} > 0 and @{$args{'values'};} <= 2000)
84 3 7 unless (@{$args{'values'};} > 0 and @{$args{'values'};} <= 125)
92 1 5 unless (defined $args{'value'})
100 2 3 unless ($args{'value'} >= 0 and $args{'value'} <= 65535)
108 2 2 unless ($args{'quantity'} > 0 and $args{'quantity'} <= 1968)
116 2 3 unless ($args{'quantity'} >= 1 and $args{'quantity'} <= 123)
144 1 1 if $_ == 5 and $self->{'value'}