App-GenPericmdScript

 view release on metacpan or  search on metacpan

script/gen-pericmd-script  view on Meta::CPAN


=item B<--subcommand>=I<s>%, B<-s>

Hash of subcommand entries, where each entry is "url[:summary]".

An optional summary can follow the URL, e.g.:

    URL[:SUMMARY]

Example (on CLI):

    --subcommand add=/My/App/add_item --subcommand bin='/My/App/bin_item:Delete an item'


Each value is a name-value pair, use I<key=value> syntax. Can be specified multiple times.

=item B<--subcommands-from-package-functions>

Form subcommands from functions under package's URL.

This is an alternative to the `subcommands` option. Instead of specifying each
subcommand's name and URL, you can also specify that subcommand names are from
functions under the package URL in `url`. So for example if `url` is `/My/App/`,
hen all functions under `/My/App` are listed first. If the functions are:

    foo
    bar
    baz_qux

then the subcommands become:

    foo => /My/App/foo
    bar => /My/App/bar
    "baz-qux" => /My/App/baz_qux


=item B<--subcommands-json>=I<s>

Hash of subcommand entries, where each entry is "url[:summary]" (JSON-encoded).

See C<--subcommand>.

=item B<--url-json>=I<s>

URL to function (or package, if you have subcommands) (JSON-encoded).

See C<--url>.

=item B<--url>=I<s>*

URL to function (or package, if you have subcommands).

=item B<--use-cleanser>

Whether to use data cleansing before outputting to JSON.

=item B<--use-utf8>

Whether to set utf8 flag on output, will be passed to Perinci::CmdLine constructor.

=item B<--validate-args>

Will be passed to Perinci::CmdLine constructor.

=back

=head2 Configuration options

=over

=item B<--config-path>=I<s>, B<-c>

Set path to configuration file.

=item B<--config-profile>=I<s>, B<-P>

Set configuration profile to use.

=item B<--no-config>, B<-C>

Do not use any configuration file.

=back

=head2 Environment options

=over

=item B<--no-env>

Do not read environment for default options.

=back

=head2 Logging options

=over

=item B<--debug>

Shortcut for --log-level=debug.

=item B<--log-level>=I<s>

Set log level.

=item B<--quiet>

Shortcut for --log-level=error.

=item B<--trace>

Shortcut for --log-level=trace.

=item B<--verbose>

Shortcut for --log-level=info.

=back

=head2 Output options

script/gen-pericmd-script  view on Meta::CPAN


By default, these names are searched for configuration filenames (can be changed using C<--config-path>): F<~/.config/gen-pericmd-script.conf>, F<~/gen-pericmd-script.conf>, or F</etc/gen-pericmd-script.conf>.

All found files will be read and merged.

To disable searching for configuration files, pass C<--no-config>.

You can put multiple profiles in a single file by using section names like C<[profile=SOMENAME]> or C<[SOMESECTION profile=SOMENAME]>. Those sections will only be read if you specify the matching C<--config-profile SOMENAME>.

You can also put configuration for multiple programs inside a single file, and use filter C<program=NAME> in section names, e.g. C<[program=NAME ...]> or C<[SOMESECTION program=NAME]>. The section will then only be used when the reading program match...

Finally, you can filter a section by environment variable using the filter C<env=CONDITION> in section names. For example if you only want a section to be read if a certain environment variable is true: C<[env=SOMEVAR ...]> or C<[SOMESECTION env=SOME...

List of available configuration parameters:

 allow_prereq (see --allow-prereq)
 allow_unknown_opts (see --allow-unknown-opts)
 cmdline (see --cmdline)
 code_after_end (see --code-after-end)
 code_before_instantiate_cmdline (see --code-before-instantiate-cmdline)
 config_dirs (see --config-dir)
 config_filename (see --config-filename)
 copt_help_enable (see --no-copt-help-enable)
 copt_help_getopt (see --copt-help-getopt)
 copt_version_enable (see --no-copt-version-enable)
 copt_version_getopt (see --copt-version-getopt)
 default_dry_run (see --default-dry-run)
 default_format (see --default-format)
 default_log_level (see --default-log-level)
 default_subcommand (see --default-subcommand)
 env_name (see --env-name)
 exclude_package_functions_match (see --exclude-package-functions-match)
 extra_urls_for_version (see --extra-urls-for-version)
 format (see --format)
 include_package_functions_match (see --include-package-functions-match)
 interpreter_path (see --interpreter-path)
 load_module (see --load-module)
 log (see --log)
 log_level (see --log-level)
 naked_res (see --naked-res)
 output_file (see --output-file)
 overwrite (see --overwrite)
 pack_deps (see --pack-deps)
 pass_cmdline_object (see --pass-cmdline-object)
 per_arg_json (see --per-arg-json)
 per_arg_yaml (see --per-arg-yaml)
 pod (see --no-pod)
 prefer_lite (see --no-prefer-lite)
 read_config (see --read-config)
 read_env (see --read-env)
 script_name (see --script-name)
 script_summary (see --script-summary)
 script_version (see --script-version)
 skip_format (see --skip-format)
 ssl_verify_hostname (see --no-ssl-verify-hostname)
 subcommands (see --subcommand)
 subcommands_from_package_functions (see --subcommands-from-package-functions)
 url (see --url)
 use_cleanser (see --use-cleanser)
 use_utf8 (see --use-utf8)
 validate_args (see --validate-args)

=head1 ENVIRONMENT

=head2 GEN_PERICMD_SCRIPT_OPT => str

Specify additional command-line options.

=head1 FILES

F<~/.config/gen-pericmd-script.conf>

F<~/gen-pericmd-script.conf>

F</etc/gen-pericmd-script.conf>

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/App-GenPericmdScript>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-App-GenPericmdScript>.

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-GenPericmdScript>

When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.

=head1 SEE ALSO

L<Perinci::CmdLine::Manual>

L<Dist::Zilla::Plugin::GenPericmdScript>

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2020, 2015 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut



( run in 2.653 seconds using v1.01-cache-2.11-cpan-140bd7fdf52 )