NAME
MouseX::App::Cmd::Command - Base class for commands.
VERSION
version 0.07
SYNOPSIS
use Mouse;
extends qw(MouseX::App::Cmd::Command);
# no need to set opt_spec
# see MouseX::Getopt for documentation on how to specify options
has option_field => (
isa => "Str",
is => "rw",
required => 1,
);
sub execute {
my ( $self, $opts, $args ) = @_;
print $self->option_field; # also available in $opts->{option_field}
}
DESCRIPTION
This is a replacement base class for App::Cmd::Command classes that includes MouseX::Getopt and the glue to combine the two.
METHODS
_process_args
Replaces App::Cmd::Command's argument processing in in favor of MouseX::Getopt based processing.
SEE ALSO
BUGS
Please report any bugs or feature requests on the bugtracker website http://github.com/mjg/MouseX-App-Cmd/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
AUTHORS
Yuval Kogman <nothingmuch@woobling.org>
Guillermo Roditi <groditi@cpan.org>
Mark Gardner <mjgardner@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Infinity Interactive.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.