App-GenPericmdScript

 view release on metacpan or  search on metacpan

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


Will be passed to Perinci::CmdLine constructor (JSON-encoded).

See C<--extra-urls-for-version>.

=item B<--extra-urls-for-version>=I<s@>

Will be passed to Perinci::CmdLine constructor.

Can be specified multiple times.

=item B<--include-package-functions-match>=I<s>

Only include package functions matching this pattern.

=item B<--inline>

Shortcut for --cmdline=inline.

See C<--cmdline>.

=item B<--interpreter-path>=I<s>

What to put on shebang line.

=item B<--lite>

Shortcut for --cmdline=lite.

See C<--cmdline>.

=item B<--load-module-json>=I<s>

Load extra modules (JSON-encoded).

See C<--load-module>.

=item B<--load-module>=I<s@>

Load extra modules.

Can be specified multiple times.

=item B<--log>

Will be passed to Perinci::CmdLine constructor.

=item B<--no-copt-help-enable>

=item B<--no-copt-version-enable>

=item B<--no-pod>

Currently only Perinci::CmdLine::Inline generates POD.


=item B<--no-prefer-lite>

Prefer Perinci::CmdLine::Classic backend.

=item B<--no-ssl-verify-hostname>

=item B<--pass-cmdline-object>

Will be passed to Perinci::CmdLine constructor.

Currently irrelevant when generating with Perinci::CmdLine::Inline.


=item B<--per-arg-json>

Will be passed to Perinci::CmdLine constructor.

=item B<--per-arg-yaml>

Will be passed to Perinci::CmdLine constructor.

=item B<--read-config>

Will be passed to Perinci::CmdLine constructor.

=item B<--read-env>

Will be passed to Perinci::CmdLine constructor.

=item B<--script-name>=I<s>

=item B<--script-summary>=I<s>

=item B<--script-version>=I<s>

Use this for version number instead.

=item B<--skip-format>

Assume that function returns raw text which needs no formatting.

=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:

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


For fish and zsh, install L<shcompgen> as described above.

=head1 CONFIGURATION FILE

This script can read configuration files. Configuration files are in the format of L<IOD>, which is basically INI with some extra features.

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 0.570 second using v1.01-cache-2.11-cpan-e1769b4cff6 )