Synopsis
use OptArgs;
opt quiet => (
isa => 'Bool',
alias => 'q',
comment => 'be quiet please',
);
arg item => (
isa => 'Str',
default => 1,
comment => 'try this many times',
);
my $ref = optargs;
print "Working on: $ref->{item}\n" unless $ref->{quiet};
Description
This module combines two ideas: the first is declarative syntax made successful by Moose. The second idea is to have a command processing module that doesn't stop with options, but also evaluates command arguments. The documentation s not quite complete, but the implementation is pretty close to being finished.
Comments
https://pause.perl.org/pause/query?ACTION=pause_namingmodules#Top_level_namespaces
I searched for combined option and argument processing for Perl and I found nothing that came even close to my needs. Those "bazillions" you speak of are either unmarketed, poorly named, poorly documented, or over-complicated. The fact that so many modules exist in this space without a clear winner is evidence that the problem has not yet been solved well to most people's satisfaction. So while it is not "necessary" that I make another one, I believe a fresh way of approaching the problem does no harm.
As for your two suggestions: I have read the documentation for AppConfig (plus submodules) untill my eyes glazed over and I still don't know how to use it. Configuration files? CGI parameters? For processing command options and arguments, really? And where do I find Config::All? search.cpan.org + google returns no results.
Welcome to CPAN.
> And where do I find Config::All?
Sorry, I meant "Config::Any".
But at least I don't see how puting your module outside the Getopt:: namespace will make it easier to find.
Please sign up to post a review.