1MooseX::App::Meta::RoleU:s:eCrlaCsosn:t:rBiabsuet(e3d)PMeorolseDXo:c:uAmpepn:t:aMteitoan::Role::Class::Base(3)
2
3
4
6 MooseX::App::Meta::Role::Class::Base - Meta class role for application
7 base class
8
10 This meta class role will automatically be applied to the application
11 base class. This documentation is only of interest if you intend to
12 write plugins for MooseX-App.
13
15 app_messageclass
16 Message class for generating error messages. Defaults to
17 MooseX::App::Message::Block. The default can be overwritten by altering
18 the "_build_app_messageclass" method. Defaults to
19 MooseX::App::Message::Block
20
21 app_namespace
22 Usually MooseX::App will take the package name of the base class as the
23 namespace for commands. This namespace can be changed.
24
25 app_exclude
26 Exclude namespaces included in app_namespace
27
28 app_base
29 Usually MooseX::App will take the name of the calling wrapper script to
30 construct the program name in various help messages. This name can be
31 changed via the app_base accessor. Defaults to the base name of $0
32
33 app_fuzzy
34 Boolean flag that controls if command names and attributes should be
35 matched exactly or fuzzy. Defaults to true.
36
37 app_command_name
38 Coderef attribute that controls how package names are translated to
39 command names and attributes. Defaults to
40 &MooseX::App::Utils::class_to_command
41
42 app_commands
43 Hashref with command to command class map.
44
45 app_strict
46 Boolean flag that controls if an application with superfluous/unknown
47 positional parameters should terminate with an error message or not.
48 If disabled all extra parameters will be copied to the extra_argv
49 command class attribute.
50
51 app_prefer_commandline
52 By default, arguments passed to new_with_command and new_with_options
53 have a higher priority than the command line options. This boolean flag
54 will give the command line an higher priority.
55
56 app_permute
57 Boolean flag that controls if command line arguments that take multiple
58 values (ie ArrayRef or HashRef type constraints) can be permuted.
59
61 command_check
62 Runs sanity checks on options and parameters. Will usually only be
63 executed if either HARNESS_ACTIVE or APP_DEVELOPER environment are set.
64
65 command_register
66 $self->command_register($command_moniker,$command_class);
67
68 Registers an additional command
69
70 command_get
71 my $command_class = $self->command_register($command_moniker);
72
73 Returns a command class for the given command moniker
74
75 command_class_to_command
76 my $command_moniker = $meta->command_class_to_command($command_class);
77
78 Returns the command moniker for the given command class.
79
80 command_message
81 my $message = $meta->command_message(
82 header => $header,
83 type => 'error',
84 body => $message
85 );
86
87 Generates a message object (using the class from app_messageclass)
88
89 command_usage_attributes
90 my @attributes = $meta->command_usage_attributes($metaclass);
91
92 Returns a list of attributes/command options for the given meta class.
93
94 command_usage_command
95 my @messages = $meta->command_usage_command($command_metaclass);
96
97 Returns a list of messages containing the documentation for a given
98 command meta class.
99
100 command_usage_description
101 my $message = $meta->command_usage_description($command_metaclass);
102
103 Returns a messages with the basic command description.
104
105 command_usage_global
106 my @messages = $meta->command_usage_global();
107
108 Returns a list of messages containing the documentation for the
109 application.
110
111 command_usage_header
112 my $message = $meta->command_usage_header();
113 my $message = $meta->command_usage_header($command_meta_class);
114
115 Returns a message containing the basic usage documentation
116
117 command_find
118 my @commands = $meta->command_find($commands_arrayref);
119
120 Returns a list of command names matching the user input
121
122 command_candidates
123 my $commands = $meta->command_candidates($user_command_input);
124
125 Returns either a single command or an arrayref of possibly matching
126 commands.
127
128 command_proto
129 my ($result,$errors) = $meta->command_proto($command_meta_class);
130
131 Returns all parsed options (as hashref) and erros (as arrayref) for the
132 proto command. Is a wrapper around command_parse_options.
133
134 command_args
135 my ($options,$errors) = $self->command_args($command_meta_class);
136
137 Returns all parsed options (as hashref) and erros (as arrayref) for the
138 main command. Is a wrapper around command_parse_options.
139
140 command_parse_options
141 my ($options,$errors) = $self->command_parse_options(\@attribute_metaclasses);
142
143 Tries to parse the selected attributes from @ARGV.
144
145 command_scan_namespace
146 my %namespaces = $self->command_scan_namespace($namespace);
147
148 Scans a namespace for command classes. Returns a hash with command
149 names as keys and package names as values.
150
151 command_process_attribute
152 my @attributes = $self->command_process_attribute($attribute_metaclass,$matches);
153
154 TODO ###Returns a list of all attributes with the given type
155
156 command_usage_options
157 my $usage = $self->command_usage_options($metaclass,$headline);
158
159 Returns the options usage as a message object
160
161 command_usage_parameters
162 my $usage = $self->command_usage_parameters($metaclass,$headline);
163
164 Returns the positional parameters usage as a message object
165
166 command_check_attributes
167 $errors = $self->command_check_attributes($command_metaclass,$errors,$params)
168
169 Checks all attributes. Returns/alters the $errors arrayref
170
171 command_parser_hints
172 $self->command_parser_hints($self,$metaclass)
173
174 Generates parser hints as required by MooseX::App::ParsedArgv
175
176
177
178perl v5.28.1 2017-0M5o-o2s0eX::App::Meta::Role::Class::Base(3)