App-Easer
view release on metacpan or search on metacpan
lib/App/Easer/V2.pod view on Meta::CPAN
Array of strings. See below for defaults.
A list of strings to use to configure C<Getopt::Long> for the specific
command.
By default it is set to C<gnu_getopt>. If a command is I<not> a leaf,
C<require_order> and C<pass_through> are added too, although the latter
only temporarily to allow for chaining (unrecognized options might still
trigger an exception). If C<allow_residual_options> is true,
C<pass_through> is added.
=item C<hashy_class>
String. Defaults to C<App::Easer::V2::Command>.
The class name to use for inflating applications defined as hash
references into objects.
Anything different from the default is a liability.
=item C<help>
A concise form of help, ideally a single line to explain what the
(sub-)command does. It is used when generating the whole help for the
command, as well as the list of sub-commands of the help for the parent
command.
=item C<help_channel>
String. Defaults to C<-STDOUT:encoding(UTF-8)>.
Set the output channel for automatic commands C<help>, C<commands>, and
C<tree>.
It can be set to:
=over
=item *
a sub reference, which will be called with the following signature:
sub channel ($cmd_object, @stuff_to_print);
=item *
a filehandle, used to print out stuff
=item *
a reference to a scalar, where the output will be placed
=item *
a string of the form C<filename[:binmode]>, where C<filename> can B<NOT>
contain the character C<:>. The file will be opened and if the
C<binmode> part is provided, C<binmode()> will be called on the
resulting filehandle with the provided value.
If the C<filename> part is C<-> or C<-stdout> (case insensitive), then
C<STDOUT> will be used. If C<filename> is C<-stderr> (case insensitive),
then C<STDERR> will be used.
=back
=item C<name>
String.
Name of the command. If absent, the first item in the C<alias> array is
used.
=item C<options>
Array of items.
See L</OPTIONS>.
=item C<params_validate>
Hash reference or C<undef>. Ignored if L</validate> is set.
If passed as a hash reference, two keys are supported:
=over
=item C<args>
call C<Params::Validate::validate_pos> on the C<residual_args> (see
L</OPTIONS>).
=item C<config>
call C<Params::Validate::validate> on the collected I<merged>
configuration (see L</OPTIONS>).
=back
=item C<sources>
Array of items.
See L</OPTIONS>.
=item C<validate>
Sub reference for performing validation. Will be called during the
validation phase and passed the command object instance:
$validation_sub->($self);
If set, L</params_validate> is ignored.
=back
The following YAML representation gives an overview of the elements that
define an application managed by C<App::Easer::V2>, highlighting the
necessary or I<strongly suggested> ones at the beginning:
aliases: «array of strings»
execute: «executable»
( run in 1.816 second using v1.01-cache-2.11-cpan-39bf76dae61 )