0

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.

gcbenison
  • 11,723
  • 4
  • 44
  • 82
  • I didn't word this question very well, but the effect I'm looking for can be achieved by overriding _usage_format in the consumer of MooseX::Getopt. – gcbenison Aug 28 '13 at 23:55

1 Answers1

1

Moose attributes can take a documentation option:

has foo => (
  ...,
  documentation => "The foo attribute foofles the program",
);
amon
  • 57,091
  • 2
  • 89
  • 149