Вопрос

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.

Это было полезно?

Решение

Moose attributes can take a documentation option:

has foo => (
  ...,
  documentation => "The foo attribute foofles the program",
);
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top