MooseX::App::Meta::Role::Attribute::Option - Meta attribute role for options
This meta attribute role will automatically be applied to all attributes that should be used as options. This documentation is only of interest if you intent to write plugins for MooseX-App.
Use this name instead of the attribute name as the option name
Option to mark if this attribute should be used as an option or parameter value.
Allowed values are
option - Command line option
proto - Command line option that should be processed first (eg. a config-file option that sets other attribues)
parameter - Positional parameter command line value
Arrayref of alternative option names
Extra option tags displayed in the usage information (in brackets)
Indicates the order of the parameters
Splits the value using the given separator or expression.
my @names = $attribute->cmd_name_possible();
Returns a list of all possible option names.
my $name = $attribute->cmd_name_primary();
Returns the primary option name
my $name = $attribute->cmd_usage_name();
Returns the name as used by the usage text
my $name = $attribute->cmd_usage_description();
Returns the description as used by the usage text
my @tags = $attribute->cmd_tags_list();
Returns a list of tags
my $bool = $attribute->cmd_is_bool();
Returns true, false or undef depending on the type constraint and default of the attribute:
undef: Does not have a boolean type constraint
true: Has a boolean type constraint
false: Has a boolean type constraint, and a true default value
To install MooseX::App, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::App
CPAN shell
perl -MCPAN -e shell install MooseX::App
For more information on module installation, please visit the detailed CPAN module installation guide.