NAME
Perinci::CmdLine::NonOO - Non-OO interface for Perinci::CmdLine
VERSION
This document describes version 0.02 of Perinci::CmdLine::NonOO (from Perl distribution Perinci-CmdLine-NonOO), released on 2015-09-03.
SYNOPSIS
use Perinci::CmdLine::NonOO qw(run_cmdline_app);
run_cmdline_app(url => '/Foo/bar');
which is equivalent to:
use Perinci::CmdLine::Lite;
my $cli = Perinci::CmdLine::Lite->new(url => '/Foo/bar');
$cli->run;
DESCRIPTION
Perinci::CmdLine (or its alternatives Perinci::CmdLine::Lite, Perinci::CmdLine::Any) is a command-line application framework. It "exports" your functions as a CLI application. However, Perinci::CmdLine itself has an OO interface, which can be seen as ironic. This module is an attempt to fix this. It's basically a thin functional interface wrapper over Perinci::CmdLine::Lite.
Because I'm lazy, it currently uses Perinci::Sub::Gen::FromClass and adds a bit of startup overhead. If you're concerned with startup overhead, you should use Perinci::CmdLine::Lite directly.
FUNCTIONS
run_cmdline_app(%args) -> any
Arguments ('*' denotes required arguments):
actions => any
cleanser => any
common_opts => any
completion => any
config_dirs => any
config_filename => any
default_prompt_template => any (default: "Enter %s: ")
default_subcommand => any
description => any
env_name => any
exit => any (default: 1)
extra_urls_for_version => any
formats => any
get_subcommand_from_arg => any (default: 1)
log => any
log_level => any
pass_cmdline_object => any (default: 0)
per_arg_json => any
per_arg_yaml => any
program_name => any
read_config => any (default: 1)
read_env => any (default: 1)
riap_client => any
riap_client_args => any
riap_version => any (default: 1.1)
skip_format => any
subcommands => any
summary => any
tags => any
url => any
validate_args => any (default: 1)
Return value: (any)
STATUS
Experimental, proof of concept.
SEE ALSO
Perinci::CmdLine, Perinci::CmdLine::Lite, Perinci::CmdLine::Any
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/Perinci-CmdLine-NonOO.
SOURCE
Source repository is at https://github.com/perlancar/perl-Perinci-CmdLine-NonOO.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Perinci-CmdLine-NonOO
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.
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 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.