Hello dear esteemed monks,

While Getopt::Long is a great module, I started noticing it lacks some features, like help generation or ability to stop processing arguments on first non-option. So I looked at cpan search for "getopt" at https://metacpan.org/search?q=getopt and I'm overwhelmed by the number of modules that are already there.

What I would like to get is (apart from just "processing the command line the way Getop::Long does"):

1. Generating help on the fly (Getopt::Helpful does that but seems unmaintaned);

2. Object-oriented interface via instantiation and accessors/mutators, not inheritance:

my $cli = Getopt::Something->new( "Usage: $0 [options] <file> ...", [ "x|expect=s", \@except, "<pattern> Add an exception" ], ... ); $cli->stop_on_argument( 1|0 ); $cli->run(); # or $cli->run( \@array ); if not @ARGV

3. I would love to add any other features I find missing.

So what are the latest and greatest members of Getopt:: Family? Thank you.


In reply to Getopt::TooMany: looking for a perfect CLI processor by Dallaylaen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.