perlancar / perl-Getopt-Long-More

1 stars 1 forks source link

More Stuff: Add: Decorative option specifiers (e.g. spacer, textOnly ) #15

Open tabulon opened 5 years ago

tabulon commented 5 years ago

GLD has a couple -conceptually similar- features that allow passing "option specifiers" that are "decorative" only.

Obviously, these aren't really options and hence won't end up being passed along to Getop::Long.

Instead, their sole purpose is to enable requesting for some "more stuff" to happen at a specific place in the sequence, in this case related to the generated HelpText.

Below are the two cuurent GLD features (with names I made up, for now) along with a related quote from its docs:

spacer:

... will have no effect other than causing a blank line to appear in the usage message.

textOnly :

... will be printed in the usage message with no other effect.

Of course, GLD has those signaled in ways specific to its array-oriented API; but we could easily come up with a couple analogous GLM conventions that will create the least suprise for GLD users.