1MouseX::App::Cmd::CommaUnsde(r3)Contributed Perl DocumenMtoautsieoXn::App::Cmd::Command(3)
2
3
4

NAME

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

VERSION

10       version 0.30
11

SYNOPSIS

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

DESCRIPTION

32       This is a replacement base class for App::Cmd::Command classes that
33       includes MouseX::Getopt and the glue to combine the two.
34

METHODS

36   _process_args
37       Replaces App::Cmd::Command's argument processing in favor of
38       MouseX::Getopt based processing.
39
40       If your class does the MouseX::ConfigFromFile role (or any of its
41       consuming roles like MouseX::SimpleConfig), this will provide an
42       additional "--configfile" command line option for loading options from
43       a configuration file.
44

AUTHOR

46       יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
47
49       This software is copyright (c) 2008 by Infinity Interactive, Inc..
50
51       This is free software; you can redistribute it and/or modify it under
52       the same terms as the Perl 5 programming language system itself.
53
54
55
56perl v5.32.1                      2021-01-27      MouseX::App::Cmd::Command(3)
Impressum