Created
April 8, 2014 01:48
-
-
Save schwern/10081851 to your computer and use it in GitHub Desktop.
Demonstrate Moose breaking App::Cmd commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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