in reply to MooseX::Getopt help without nagging
MooseX::GetOpt just translates options to following call to Getopt::Long::Descriptive
use Getopt::Long::Descriptive; my ($opt, $usage) = describe_options( 'usage: mxgotest.pl [-?] [long options...]', [ 'help|usage|?!' => 'Prints this usage information.' ], [ 'name=s' => 'Sets the name', { required => 1 } ], );
The message is caused by required parameter. From the GLD docs:
If an option is required, failure to provide the option will result in describe_options printing the usage message and exiting.
I would remove the required from the name attribute and implemented the functionality after new_with_options call.
-- Roman
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: MooseX::Getopt help without nagging
by Boldra (Curate) on Aug 25, 2010 at 07:41 UTC |