Skip to content

Instantly share code, notes, and snippets.

@schwern
Created April 8, 2014 01:48
Show Gist options
  • Save schwern/10081851 to your computer and use it in GitHub Desktop.
Save schwern/10081851 to your computer and use it in GitHub Desktop.
Demonstrate Moose breaking App::Cmd commands
#!/usr/bin/perl
{
package App::Cmd::Bug;
use App::Cmd::Setup -app;
BEGIN { $INC{"App/Cmd/Bug.pm"} = 1; }
}
{
package App::Cmd::Bug::Command::foo;
# Using Moose causes the usage description to break.
use Moose;
no Moose;
use App::Cmd::Bug -command;
sub validate_args {
my $self = shift;
$self->usage_error("This will never work");
return;
}
}
use App::Cmd::Bug;
App::Cmd::Bug->run;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment