1MooseX::App::Cmd::CommaUnsde(r3)Contributed Perl DocumenMtoaotsieoXn::App::Cmd::Command(3)
2
3
4

NAME

6       MooseX::App::Cmd::Command - Base class for MooseX::Getopt based
7       App::Cmd::Commands.
8

SYNOPSIS

10           use Moose;
11
12           extends qw(MooseX::App::Cmd::Command);
13
14           # no need to set opt_spec
15           # see MooseX::Getopt for documentation on how to specify options
16           has option_field => (
17               isa => "Str",
18               is  => "rw",
19               required => 1,
20           );
21
22           sub execute {
23               my ( $self, $opts, $args ) = @_;
24
25               print $self->option_field; # also available in $opts->{option_field}
26           }
27

DESCRIPTION

29       This is a replacement base class for App::Cmd::Command classes that
30       includes MooseX::Getopt and the glue to combine the two.
31

METHODS

33       _process_args
34           Replaces App::Cmd::Command's argument processing in in favour of
35           MooseX::Getopt based processing.
36

TODO

38       Full support for Getopt::Long::Descriptive's abilities is not yet
39       written.
40
41       This entails taking apart the attributes and getting at the
42       descriptions.
43
44       This might actually be added upstream to MooseX::Getopt, so until we
45       decide here's a functional but not very helpful (to the user) version
46       anyway.
47
48
49
50perl v5.12.0                      2009-09-17      MooseX::App::Cmd::Command(3)
Impressum