line |
true |
false |
branch |
75
|
0 |
1 |
unless my $device = shift() |
79
|
1 |
0 |
if ($device =~ /map.*\.txt/ and not -c $device) |
92
|
0 |
0 |
if (@_) |
94
|
0 |
0 |
if (@_ % 2 == 0) { } |
|
0 |
0 |
elsif (@_ == 1) { } |
98
|
0 |
0 |
unless ref $_[0] eq 'HASH' |
106
|
0 |
0 |
if (my $n = delete $param{'cache_expire'}) |
107
|
0 |
0 |
unless $n =~ /^\s*(\d{1,3})\s*$/ |
112
|
0 |
0 |
if (my $n = delete $param{'cache_readahead'}) |
113
|
0 |
0 |
unless $n =~ /^\s*(\d{1,2})\s*$/ |
116
|
0 |
0 |
if ($n > 30) |
123
|
0 |
0 |
if (my $p = delete $param{'trace'}) |
124
|
0 |
0 |
if ($p eq '1') |
132
|
0 |
0 |
if (my(@unknown) = sort(keys %param)) |
139
|
0 |
0 |
unless $$self{'fh'} = _ws_open($device) |
152
|
0 |
2 |
if (defined $$self{'fh'}) |
153
|
0 |
0 |
unless _ws_close($$self{'fh'}) |
164
|
0 |
0 |
if ($length > 30) |
170
|
0 |
0 |
if (my $cache = $$self{'cache'}) |
176
|
0 |
0 |
if ($$c{'expires'} < time) |
178
|
0 |
0 |
if @$cache == 0 |
183
|
0 |
0 |
if ($$c{'address'} <= $address) |
184
|
0 |
0 |
if ($address + $length < $$c{'address'} + @{$$c{'data'};}) |
197
|
0 |
0 |
if ($n_read < $length or $expire == 0) |
204
|
0 |
0 |
if ($expire != 0) |
219
|
0 |
74 |
unless my $field = shift() |
222
|
0 |
74 |
unless my $get = $$self{'mmap'}->find_field($field) |
232
|
0 |
74 |
if (@_ and lc $_[0] eq 'raw') |
234
|
0 |
0 |
wantarray ? : |
244
|
7 |
67 |
if $BCD eq '' |
254
|
0 |
74 |
if ($BCD =~ /[^0-9]/ and not $expr =~ /hex/) |
255
|
0 |
0 |
if $^W |
263
|
17 |
0 |
if ($_[0] =~ /^(\d{1,2})(\d\d)(\d\d)(\d\d)(\d\d)$/) |
273
|
3 |
71 |
if ($expr =~ /\d=.*,.*\d=/) |
277
|
0 |
9 |
unless $pair =~ /([0-9a-f])=(.*)/i |
282
|
3 |
0 |
if (defined $val) { } |
292
|
0 |
71 |
if ($@) |
297
|
0 |
71 |
if (@_) |
311
|
1 |
9 |
if (lc $units_in eq lc $units_out) |
317
|
1 |
8 |
unless (keys %Convert) |
319
|
3 |
7 |
if $line eq '' |
320
|
0 |
7 |
unless $line =~ /^(\S+)\s+(\S+)\((\d+)\)\s+(.*)/ |
327
|
0 |
9 |
unless (exists $Convert{$units_in}) |
336
|
0 |
9 |
unless (@match) |
344
|
0 |
9 |
if ($@) |
360
|
0 |
1 |
if (ref $class) { } |
|
1 |
0 |
elsif ($ws) { } |
365
|
1 |
0 |
if (ref $ws) { } |
366
|
1 |
0 |
if (ref($ws) =~ /^Device::LaCrosse::WS23xx/) { } |
375
|
0 |
0 |
unless $ws_obj = $class->new($ws) |
425
|
0 |
1 |
unless my $path = shift() |
434
|
0 |
1 |
unless open my $map_fh, '<', $path |
438
|
5072 |
86 |
if ($line =~ /^([0-9a-f]{4})\s+([0-9a-f])\s*/i) |