line |
true |
false |
branch |
166
|
1 |
0 |
if ($opts =~ s/^-C:(.*?)=(.*)(?:$|,)//u) { } |
|
0 |
0 |
elsif ($opts =~ s/^-M:(.*?)=(.*)(?:$|,)//u) { } |
179
|
0 |
9 |
unless &GetOptionsFromArray($argv, %optspec, "adapter|A=s", sub {
$ADAPTERDESC = $_[1];
undef $adapter;
}
, "<>", sub {
my($chiptype, $opts) = split(/:/u, $_[0], 2);
$adapter //= "Device::Chip::Adapter"->new_from_description($ADAPTERDESC);
my(%config) = ("type", $chiptype, "adapter", $adapter);
while (length $opts) {
if ($opts =~ s/^-C:(.*?)=(.*)(?:$|,)//u) {
$config{'config'}{$1} = $2;
}
elsif ($opts =~ s/^-M:(.*?)=(.*)(?:$|,)//u) {
$config{'mountopts'}{$1} = $2;
}
else {
croak("Unable to parse chip configuration options '${opts}' for ${chiptype}'");
};
};
$self->add_chip(%config);
}
) |
237
|
7 |
5 |
if $_chips |
250
|
0 |
5 |
if $chipconfig->{'mountopts'} |
254
|
0 |
5 |
if ($chipconfig->{'config'}) |
260
|
1 |
4 |
if ($chip->can("initialize_sensors")) |
288
|
2 |
5 |
if $_sensors |
362
|
3 |
9 |
if ($_mid3) |
367
|
0 |
3 |
unless $sensor->type eq "gauge" |
375
|
1 |
2 |
if (@$readings == 3 and &all(sub {
;
}
, @$readings)) |
408
|
0 |
2 |
if defined $units |
411
|
0 |
2 |
if (not defined $value) { } |
|
1 |
1 |
elsif ($sensor->type eq 'gauge') { } |