.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "MooseX::App::Meta::Role::Class::Base 3pm" .TH MooseX::App::Meta::Role::Class::Base 3pm "2014-08-24" "perl v5.20.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" MooseX::App::Meta::Role::Class::Base \- Meta class role for application base class .SH "DESCRIPTION" .IX Header "DESCRIPTION" This meta class role will automatically be applied to the application base class. This documentation is only of interest if you intend to write plugins for MooseX-App. .SH "ACCESSORS" .IX Header "ACCESSORS" .SS "app_messageclass" .IX Subsection "app_messageclass" Message class for generating error messages. Defaults to MooseX::App::Message::Block. The default can be overwritten by altering the \f(CW\*(C`_build_app_messageclass\*(C'\fR method. Defaults to MooseX::App::Message::Block .SS "app_namespace" .IX Subsection "app_namespace" Usually MooseX::App will take the package name of the base class as the namespace for commands. This namespace can be changed. .SS "app_base" .IX Subsection "app_base" Usually MooseX::App will take the name of the calling wrapper script to construct the program name in various help messages. This name can be changed via the app_base accessor. Defaults to the base name of \f(CW$0\fR .SS "app_fuzzy" .IX Subsection "app_fuzzy" Boolean flag that controlls if command names and attributes should be matched exactly or fuzzy. Defaults to true. .SS "app_command_name" .IX Subsection "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 .SS "app_commands" .IX Subsection "app_commands" Hashref with command to command class map. .SS "app_strict" .IX Subsection "app_strict" Boolean flag that controls if an application with superfluous/unknown positional parameters should terminate with an error message or not. If disabled all extra parameters will be copied to the extra_argv command class attribute. .SS "app_prefer_commandline" .IX Subsection "app_prefer_commandline" By default, arguments passed to new_with_command and new_with_options have a higher priority than the command line options. This boolean flag will give the command line an higher priority. .SH "METHODS" .IX Header "METHODS" .SS "command_register" .IX Subsection "command_register" .Vb 1 \& $self\->command_register($command_moniker,$command_class); .Ve .PP Registers an additional command .SS "command_get" .IX Subsection "command_get" .Vb 1 \& my $command_class = $self\->command_register($command_moniker); .Ve .PP Returns a command class for the given command moniker .SS "command_class_to_command" .IX Subsection "command_class_to_command" .Vb 1 \& my $command_moniker = $meta\->command_class_to_command($command_class); .Ve .PP Returns the command moniker for the given command class. .SS "command_message" .IX Subsection "command_message" .Vb 5 \& my $message = $meta\->command_message( \& header => $header, \& type => \*(Aqerror\*(Aq, \& body => $message \& ); .Ve .PP Generates a message object (using the class from app_messageclass) .SS "command_usage_attributes" .IX Subsection "command_usage_attributes" .Vb 1 \& my @attributes = $meta\->command_usage_attributes($metaclass); .Ve .PP Returns a list of attributes/command options for the given meta class. .SS "command_usage_command" .IX Subsection "command_usage_command" .Vb 1 \& my @messages = $meta\->command_usage_command($command_metaclass); .Ve .PP Returns a list of messages containing the documentation for a given command meta class. .SS "command_usage_description" .IX Subsection "command_usage_description" .Vb 1 \& my $message = $meta\->command_usage_description($command_metaclass); .Ve .PP Returns a messages with the basic command description. .SS "command_usage_global" .IX Subsection "command_usage_global" .Vb 1 \& my @messages = $meta\->command_usage_global(); .Ve .PP Returns a list of messages containing the documentation for the application. .SS "command_usage_header" .IX Subsection "command_usage_header" .Vb 2 \& my $message = $meta\->command_usage_header(); \& my $message = $meta\->command_usage_header($command_meta_class); .Ve .PP Returns a message containing the basic usage documentation .SS "command_find" .IX Subsection "command_find" .Vb 1 \& my @commands = $meta\->command_find($user_command_input); .Ve .PP Returns a list of command names matching the user input .SS "command_candidates" .IX Subsection "command_candidates" .Vb 1 \& my $commands = $meta\->command_candidates($user_command_input); .Ve .PP Returns either a single command or an arrayref of possibly matching commands. .SS "command_proto" .IX Subsection "command_proto" .Vb 1 \& my ($result,$errors) = $meta\->command_proto($command_meta_class); .Ve .PP Returns all parsed options (as hashref) and erros (as arrayref) for the proto command. Is a wrapper around command_parse_options. .SS "command_args" .IX Subsection "command_args" .Vb 1 \& my ($options,$errors) = $self\->command_args($command_meta_class); .Ve .PP Returns all parsed options (as hashref) and erros (as arrayref) for the main command. Is a wrapper around command_parse_options. .SS "command_parse_options" .IX Subsection "command_parse_options" .Vb 1 \& my ($options,$errors) = $self\->command_parse_options(\e@attribute_metaclasses); .Ve .PP Tries to parse the selected attributes from \f(CW@ARGV\fR. .SS "command_scan_namespace" .IX Subsection "command_scan_namespace" .Vb 1 \& my %namespaces = $self\->command_scan_namespace($namespace); .Ve .PP Scans a namespace for command classes. Returns a hash with command names as keys and package names as values. .SS "command_process_attribute" .IX Subsection "command_process_attribute" .Vb 2 \& my @attributes = $self\->command_process_attributes($metaclass,[qw(option proto)]); \& my @attributes = $self\->command_process_attributes($metaclass,\*(Aqparameter\*(Aq); .Ve .PP Returns a list of all attributes with the given type .SS "command_usage_options" .IX Subsection "command_usage_options" .Vb 1 \& my $usage = $self\->command_usage_options($metaclass,$headline); .Ve .PP Returns the options usage as a message object .SS "command_usage_parameters" .IX Subsection "command_usage_parameters" .Vb 1 \& my $usage = $self\->command_usage_parameters($metaclass,$headline); .Ve .PP Returns the positional parameters usage as a message object .SS "command_check_attributes" .IX Subsection "command_check_attributes" .Vb 1 \& $errors = $self\->command_check_attributes($command_meta,$errors,$params) .Ve .PP Checks all attributes. Returns/alters the \f(CW$errors\fR arrayref .SS "command_parser_hints" .IX Subsection "command_parser_hints" .Vb 1 \& $self\->command_parser_hints($self,$metaclass) .Ve .PP Generates parser hints as required by MooseX::App::ParsedArgv