|
167
|
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;
}
else {
croak("Unable to parse chip configuration options '${opts}' for ${chiptype}'");
};
};
push @_CHIPCONFIGS, $config;
}
) |