line |
true |
false |
branch |
158
|
1 |
0 |
if ($opts =~ s/^-C:(.*?)=(.*)(?:$|,)//u) { } |
|
0 |
0 |
elsif ($opts =~ s/^-M:(.*?)=(.*)(?:$|,)//u) { } |
171
|
0 |
8 |
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}'");
};
};
push @_CHIPCONFIGS, $config;
}
) |
189
|
5 |
4 |
if $_chips |
202
|
0 |
4 |
if $chipconfig->{'mountopts'} |
206
|
0 |
4 |
if ($chipconfig->{'config'}) |
212
|
1 |
3 |
if ($chip->can("initialize_sensors")) |
240
|
1 |
4 |
if $_sensors |
305
|
3 |
5 |
if ($_mid3) |
310
|
0 |
3 |
unless $sensor->type eq "gauge" |
318
|
1 |
2 |
if (@$readings == 3 and &all(sub {
;
}
, @$readings)) |
351
|
0 |
2 |
if defined $units |
354
|
0 |
2 |
if (not defined $value) { } |
|
1 |
1 |
elsif ($sensor->type eq 'gauge') { } |