Question

What's the usual way to include "usage" text in a program using MooseX::Getopt? (i.e. running myprog --usage should print something like "myprog: make everything great")

The MooseX::Getopt documentation says:

"If Getopt::Long::Descriptive is installed and any of the following command line params are passed, the program will exit with usage information. You can add descriptions for each option by including a documentation option for each attribute to document."

but I'm having trouble parsing that last sentence.

Était-ce utile?

La solution

Moose attributes can take a documentation option:

has foo => (
  ...,
  documentation => "The foo attribute foofles the program",
);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top