Boldra has asked for the wisdom of the Perl Monks concerning the following question:
I have a simple MooseX::GetOpt class:
but when I run with -? --man or --help I get reminded that I'm missing a required switch:package MXGOTest; use Moose; use 5.010; with 'MooseX::Getopt'; has name => ( is => 'rw', isa => 'Str', required => 1); sub run { say "NAME=" . shift->{name}; } 1;
Is there a way to get the usage information without getting complaints about missing args?$ perl mxgotest.pl --help Required option missing: name usage: mxgotest.pl [-?] [long options...] -? --usage --help Prints this usage information. --name
Thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: MooseX::Getopt help without nagging
by stonecolddevin (Parson) on Aug 24, 2010 at 19:08 UTC | |
Re: MooseX::Getopt help without nagging
by bobr (Monk) on Aug 24, 2010 at 19:52 UTC | |
by Boldra (Deacon) on Aug 25, 2010 at 07:41 UTC | |
Re: MooseX::Getopt help without nagging
by TomDLux (Vicar) on Aug 25, 2010 at 14:50 UTC | |
by Boldra (Deacon) on Aug 26, 2010 at 06:06 UTC |
Back to
Seekers of Perl Wisdom