Maroš Kollár > MooseX-App-1.14 > MooseX::App::Meta::Role::Class::Base

Download:
MooseX-App-1.14.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source   Latest Release: MooseX-App-1.30

NAME ^

MooseX::App::Meta::Role::Class::Base - Meta class role for application base class

DESCRIPTION ^

This meta class role will automatically be applied to the application base class. This documentation is only of interest if you intent to write plugins for MooseX-App.

ACCESSORS ^

app_messageclass

Message class for generating error messages. Defaults to MooseX::App::Message::Block. The default can be overwritten by altering the _build_app_messageclass method. Defaults to MooseX::App::Message::Block

app_namespace

Usually MooseX::App will take the package name of the base class as the namespace for commands. This namespace can be changed.

app_base

Usually MooseX::App will take the name of the calling wrapper script to construct the programm name in various help messages. This name can be changed via the app_base accessor. Defaults to the base name of $0

app_fuzzy

Boolean attribute that controlls if command names and attributes should be matched exactly or fuzzy. Defaults to true.

app_command_name

Coderef attribute that controlls how package names are translated to command names and attributes. Defaults to MooseX::App::Utils::class_to_command

METHODS ^

command_class_to_command

 my $command_moniker = $meta->command_class_to_command($command_class);

Returns the command moniker for the given command class name.

command_message

 my $message = $meta->command_message( header => $header, type => 'error', body => $message );

Generates a message object (based on app_messageclass)

command_usage_attributes

 my $message = $meta->command_usage_attributes($metaclass,$headline);

Returns a message object containing the attribute documentation for a given meta class.

command_usage_attributes_list

 my @attributes = $meta->command_usage_attributes($metaclass);

Returns a list of attributes/command options.

command_usage_attributes_raw

 my @attributes = $meta->command_usage_attributes_raw($metaclass);

Returns a list of attribute documentations for a given meta class.

command_usage_attribute_detail

 my ($name,$description) = $meta->command_usage_attribute_detail($metaattribute);

Returns a name and description for a given meta attribute class.

command_usage_attribute_tags

 my (@tags) = $meta->command_usage_attribute_tags($metaattribute);

Returns a list of tags for the given attribute.

command_usage_attribute_name

 my ($name,$description) = $meta->command_usage_attribute_name($metaattribute);

Returns a name for a given meta attribute class.

command_usage_attribute_tag

 my @tags = $meta->command_usage_attribute_name($metaattribute);

Returns a list of tags for a given meta attribute class.

command_usage_command

 my @messages = $meta->command_usage_command($command_metaclass);

Returns a list of messages containing the documentation for a given command meta class.

command_usage_description

 my $message = $meta->command_usage_description($command_metaclass);

Returns a messages with the basic command description.

command_usage_global

 my @messages = $meta->command_usage_global();

Returns a list of messages containing the documentation for the application.

command_usage_header

 my $message = $meta->command_usage_header();
 my $message = $meta->command_usage_header($command_meta_class);

Returns a message containing the basic usage documentation

app_commands

 my $commands = $meta->app_commands;

Returns a hashref of command name and command class.

command_get

 my @commands = $meta->command_get($user_command_input);

Returns a list of command names matching the user input

command_candidates

 my $commands = $meta->command_candidates($user_command_input);

Returns either a single command or an arrayref of possibly matching commands.

proto_command

 my $result = $meta->proto_command();

Returns the proto command command-line options.

proto_options

 my @getopt_options = $meta->proto_command($result_hashref);

Sets the GetOpt::Long options for the proto command

syntax highlighting: