method _parse_req_args (HashRef :$type_href) {
my @ret;
foreach my $subtype ( keys %$type_href ) {
my $hard;
if ( $subtype eq 'hard' ) {
$hard = 1;
}
elsif ( $subtype eq 'soft' ) {
$hard = 0;
}
else {
$self->warn("unrecognized required arg subtype: $subtype");
}
my $subtype_href = $type_href->{$subtype};
foreach my $cli_arg ( keys %$subtype_href ) {
my $method_arg = $subtype_href->{$cli_arg};
my $opt = CLI::Driver::Option->new(
required => 1,
hard => $hard,
cli_arg => $cli_arg,
method_arg => $method_arg
);
push @ret, $opt;
}
}
return @ret;
}