App-GenPericmdScript

 view release on metacpan or  search on metacpan

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

#!perl

our $DATE = '2020-04-30'; # DATE
our $VERSION = '0.230'; # VERSION

use 5.010;
use strict;
use warnings;

use Perinci::CmdLine::Any;

Perinci::CmdLine::Any->new(
    url => '/Perinci/CmdLine/Gen/gen_pericmd_script',
    log => 1,
)->run;

# ABSTRACT: Generate Perinci::CmdLine CLI script
# PODNAME: gen-pericmd-script

__END__

=pod

=encoding UTF-8

=head1 NAME

gen-pericmd-script - Generate Perinci::CmdLine CLI script

=head1 VERSION

This document describes version 0.230 of gen-pericmd-script (from Perl distribution App-GenPericmdScript), released on 2020-04-30.

=head1 SYNOPSIS

Create a Perinci::CmdLine script:

 % gen-pericmd-script /App/MyApp/myfunc > mycli

Some more options (turn on debugging, output to file, overwrite existing output,
will automatically chmod +x the file and run L<shcompgen> if it's available on
the system and output dir is in PATH, pick Perinci::CmdLine::Any backend):

 % gen-pericmd-script --debug \
     -o /path/to/mycli --overwrite \
     --cmdline Perinci::CmdLine::Classic \
     /App/MyApp/myfunc

With subcommands:

 % gen-pericmd-script /App/MyApp/ \
     -s update:/App/MyApp/update -s delete:/App/MyApp/delete \
     > mycli

=head1 DESCRIPTION

=head1 OPTIONS

C<*> marks required options.

=head2 Main options

=over

=item B<--allow-unknown-opts>

Will be passed to Perinci::CmdLine constructor.

=item B<--classic>

Shortcut for --cmdline=classic.

See C<--cmdline>.

=item B<--cmdline>=I<s>

Specify module to use.

Default value:

 "Perinci::CmdLine::Any"

=item B<--code-after-end>=I<s>

=item B<--code-before-instantiate-cmdline>=I<s>

=item B<--config-dir>=I<s@>

Will be passed to Perinci::CmdLine constructor.

Can be specified multiple times.

=item B<--config-dirs-json>=I<s>

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

See C<--config-dir>.

=item B<--config-filename-json>=I<s>

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



( run in 0.871 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )