nysus has asked for the wisdom of the Perl Monks concerning the following question:
I'm using the MooseX::App::Cmd::Command in one of my modules.
When I try to use the following:
with qw( MooseX::Getopt::Usage );
...I get the following error:
Attribute (usage) does not pass the type constraint because: Validatio +n failed for 'Object' with value undef at constructor DzilCommands::C +ommand::create_commands::new (defined at /Users/me/perl5/perlbrew/per +ls/perl-5.24.1/lib/site_perl/5.24.1/DzilCommands/Command/create_comma +nds.pm line 115) line 100
I can get the error to go away by adding this attribute:
has 'usage' => ( default => sub { Getopt::Long::Descriptive::U +sage->new }, is => 'ro');
...but then when I got to print help, nothing shows up. Any guidance on how to use MooseX::Getopt::Usage with MooseX::App::Cmd::Command is greatly appreciated. Thank you!
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using "with 'MooseX::Getopt::Usage' throwing error with MooseX::App::Cmd::Command
by choroba (Cardinal) on Feb 05, 2018 at 17:18 UTC | |
by nysus (Parson) on Feb 05, 2018 at 17:51 UTC |