You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a command class uses Moose (or Mouse) the "Usage" output will be lost. Even with "no Moose".
$ perl -Ilib bin/test foo
Error: This will never work
Usage: at /Users/schwern/perl5/perlbrew/perls/perl-5.18.1-thread/lib/site_perl/5.18.1/App/Cmd/Command.pm line 90.
#!/usr/bin/perl
{
packageApp::Cmd::Bug;
use App::Cmd::Setup -app;
BEGIN { $INC{"App/Cmd/Bug.pm"} = 1; }
}
{
packageApp::Cmd::Bug::Command::foo;
# Using Moose causes the usage description to break.use Moose;
no Moose;
use App::Cmd::Bug -command;
subvalidate_args {
my$self = shift;
$self->usage_error("This will never work");
return;
}
}
use App::Cmd::Bug;
App::Cmd::Bug->run;
Using Moose gets Moose::Object into @INC before App::Command::Command, which is put there by use App::Cmd::Bug -command, so the "wrong" new run. The only likely solution, here, is documentation.
If a command class uses Moose (or Mouse) the "Usage" output will be lost. Even with "no Moose".
See https://gist.github.com/schwern/10081851 for test code.
The text was updated successfully, but these errors were encountered: