perlancar

NAME

Perinci::CmdLine::Lite - A lightweight Rinci/Riap-based command-line application framework

VERSION

This document describes version 0.88 of Perinci::CmdLine::Lite (from Perl distribution Perinci-CmdLine-Lite), released on 2015-02-27.

SYNOPSIS

See Perinci::CmdLine::Manual::Examples.

DESCRIPTION

See Perinci::CmdLine::Manual.

REQUEST KEYS

All those supported by Perinci::CmdLine::Base, plus:

  • naked_res => bool

    Set to true if user specifies --naked-res.

ATTRIBUTES

All the attributes of Perinci::CmdLine::Base, plus:

log => bool (default: 0, or from env)

Whether to enable logging. This currently means setting up Log::Any::Adapter to display logging (set in hook_after_parse_argv, so tab completion skips this step). To produce log, you use Log::Any in your code.

The default is off. If you set LOG=1 or LOG_LEVEL or TRACE/DEBUG/VERBOSE/QUIET, then the default will be on. It defaults to off if you set LOG=0 or LOG_LEVEL=off.

log_level => str (default: warning, or from env)

Set default log level. The default can also be set via LOG_LEVEL/TRACE/DEBUG/VERBOSE/QUIET.

METHODS

All the methods of Perinci::CmdLine::Base, plus:

ENVIRONMENT

All the environment variables that Perinci::CmdLine::Base supports, plus:

DEBUG

Set log level to 'debug'.

VERBOSE

Set log level to 'info'.

QUIET

Set log level to 'error'.

TRACE

Set log level to 'trace'.

LOG_LEVEL

Set log level.

PROGRESS => BOOL

Explicitly turn the progress bar on/off.

FORMAT_PRETTY_TABLE_COLUMN_ORDERS => array (json)

Set the default of table_column_orders in result_format_options in result metadata, similar to what's implemented in Perinci::Result::Format and Data::Format::Pretty::Console.

RESULT METADATA

All those supported by Perinci::CmdLine::Base, plus:

x.hint.result_binary => bool

If set to true, then when formatting to text formats, this class won't print any newline to keep the data being printed unmodified.

SEE ALSO

Perinci::CmdLine, Perinci::CmdLine::Manual

Perinci::CmdLine::Any

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Perinci-CmdLine-Lite.

SOURCE

Source repository is at https://github.com/perlancar/perl-Perinci-CmdLine-Lite.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Perinci-CmdLine-Lite

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.