Perinci-CmdLine-Lite
view release on metacpan or search on metacpan
'app2' that belong to the suite. The program 'app1' can be set to read
from 'mysuite.conf' as well as the more specific 'app1.conf'. But in
'mysuite.conf', the configuration is read from the [app1] (or say
[app.app1]) section. This allows 'mysuite.conf' to contain
configuration for a hierarchy of programs/subsystems without being
mixed up.
- [Removed] Remove support for old section syntax in config: [SUBCOMMAND
profile=P1 ...] now has to be written as [subcommand=SUBCOMMAND
profile=P1 ...]. Otherwise, the name before the first key=value pair
will be assumed to be a section name.
1.56 2016-07-20 Released-By: PERLANCAR
- No functional changes.
- [dist] Bump prereq versions to force upgrades (support for schemas
based on other schemas): Data::Sah to 0.84,
Perinci::Sub::GetArgs::Argv to 0.72.
1.55 2016-05-20 Released-By: PERLANCAR
- Replace Perinci::Sub::CoerceArgs with Data::Sah 0.76+ coercion.
1.54 2016-05-09 Released-By: PERLANCAR
- Properly complete Unicode filenames. This include converting
command-line arguments from octets into Unicode strings (though this
should probably be enabled only when LANG =~ /UTF-8/ or something),
and converting completion filename answer entries from octets to
Unicode strings (done by Complete-File).
- [Internal] Move up attribute 'use_utf8' from PC:Lite to PC:Base.
1.53 2016-04-04 Released-By: PERLANCAR
- [ux] For argument with cmdline_src=stdin_or_args, only get from
stdin when stdin is piped, otherwise sometimes user gets confused
because program seems to hang when such argument is not
specified.
1.52 2016-03-16 Released-By: PERLANCAR
- No functional changes.
- Replace JSON with JSON::MaybeXS.
1.51 2016-02-26 Released-By: PERLANCAR
- Implement cmdline_src=stdin_or_args (Rinci 1.1.79).
1.50 2016-02-04 Released-By: PERLANCAR
- [Bugfix] When streaming input (argument) has schema=array, use
its 'of' clause subschema.
- Adjust to Complete::Bash 0.27.
- In completing --config-profile, force reading of config files
(previously if program has subcommands and no subcommand name is
specified in ARGV, parse_argv() will skip directly to --help.
1.49 2016-01-23 Released-By: PERLANCAR
- Allow filtering config section with env=...
- [Bugfix] Config sections should be read according to the order
they are seen in the files.
1.48 2016-01-22 Released-By: PERLANCAR
- Bump prereq version Test::Perinci::CmdLine to 1.37.
- Observe cmdline.chomp (allow turning-off autochomping of
streaming input record).
1.47 2016-01-22 Released-By: PERLANCAR
- Chomp streaming input record, unless type is 'buf'. Adjust to
Test::Perinci::CmdLine 1.36.
1.46 2016-01-21 Released-By: PERLANCAR
- Update to Test::Perinci::CmdLine 1.33.
- Allow filtering config section with program=...
- Add use_utf8 to Lite, just like in Classic.
1.45 2016-01-14 Released-By: PERLANCAR
- [Lite] Add attribute 'use_utf8' just like in Classic.
1.44 2016-01-07 Released-By: PERLANCAR
- Allow multiple config_filename.
1.43 2015-12-30 Released-By: PERLANCAR
- Use Complete::Bash 0.23's new option truncate_current_word, like
in Getopt::Long::Complete and Getopt::Long::Subcommand.
- Bump prereq version Log::Any::IfLOG to 0.07.
1.42 2015-12-02 Released-By: PERLANCAR
- Adopt a new syntax for specifying configuration for subcommand.
Previously to specify configuration for a subcommand, you use
'[SCNAME]' section (or when you want to assign a profile: '[SCNAME
profile=PNAME]', now you use '[subcommand=SCNAME]' (or when you want
to assign a profile: '[subcommand=SCNAME profile=PNAME]' or
'[profile=PNAME subcommand=SCNAME]'). Basically, we now regard IOD
section as a whitespace-separated list of key=value pairs. This new
syntax is clearer and more generic, it allows application to add its
own key=value pair as needed. The old syntax is now not documented.
Although it will still be supported for sometime, it will be removed
in the future.
1.41 2015-11-29 Released-By: PERLANCAR
- [Experimental] Detect 'td' (see App::td) at the right side of
pipeline and set default output format to json.
1.40 2015-11-27 Released-By: PERLANCAR
- On error, don't display result as stream but show format &
display error message instead.
1.39 2015-11-21 Released-By: PERLANCAR
- Adjust to Perinci::Result::Format::Lite 0.07 (CSV support).
- Search $HOME/.config before $HOME for config files.
0.87 2015-02-26 Released-By: PERLANCAR
- [Bugfix] Pass subcommands hash to Perinci::CmdLine::Help even
though subcommands list is dynamic (coderef).
0.86 2015-02-24 Released-By: PERLANCAR
- [ux] Reorder columns in table output according to result metadata's
result_format_options->table_column_orders, result metadata's
table.fields, or FORMAT_PRETTY_TABLE_COLUMN_ORDERS.
- [ux] Tweak formatting of table with header row.
0.85 2015-02-21 Released-By: PERLANCAR
- [Bugfix] Assume all 2xx (not just 200) as well as 304 as success (exit
code 0).
0.84 2015-02-06 Released-By: PERLANCAR
- No functional changes.
- [doc] Reflect the Perinci::CmdLine -> Perinci::CmdLine::Classic rename
in the documentation.
0.83 2015-01-28 Released-By: PERLANCAR
- No functional changes.
- Move patching of Log::Any::Adapter::ScreenColoredLevel to
Progress::Any::Output::Term* so it can be used outside of
Perinci::CmdLine.
0.82 2015-01-22 Released-By: PERLANCAR
- Add progress bar feature to Perinci::CmdLine::Lite, like in
Perinci::CmdLine.
0.81 2015-01-20 Released-By: PERLANCAR
- Add JSON stream (input, output) support. Currently this is only
minimally documented. Basically, if argument type is non-simple, then
each input stream line will be assumed to be in JSON (an exception
will be thrown if it does not parse as valid JSON) and will be decoded
before fed to function. Likewise, if result type is non-simple, then
every record will be encoded to JSON to produce JSON stream.
0.80 2015-01-17 Released-By: PERLANCAR
- Support Rinci 1.1.71, where streaming input & output uses coderef
only.
- [Bugfix] Respect 'result/stream' metadata property which provides
default for whether result is streaming or not (it is overriden by the
'stream' result metadata property).
- [doc] Reorganize manual: to avoid confusion, move all examples from
FAQ to Examples. Add examples for result streaming. Update examples.
0.79 2015-01-15 Released-By: PERLANCAR
- Fixes in help message (program summary from meta was not
displayed, show subcommands, passed wrong variable).
0.78 2015-01-14 Released-By: PERLANCAR
- Refactor config reading routine to
Perinci::CmdLine::Util::Config, change 'read_config_file' request
key to 'read_config_files', add request key 'config' containing
the whole config.
0.77 2015-01-10 Released-By: PERLANCAR
- No functional changes.
- Add logging messages.
0.76 2015-01-09 Released-By: PERLANCAR
- [Bugfix] Fix completing positional function arguments when there
are subcommands.
0.75 2015-01-09 Released-By: PERLANCAR
- No functional changes.
- Some fixes.
0.74 2015-01-09 Released-By: PERLANCAR
[ENHANCEMENTS]
- Support supplying options from environment variable (like, e.g. cpanm
with its PERL_CPANM_OPT). By default environment variable named
'${PROG}_OPT' is used, e.g. if your script is named 'foo-bar' then the
environment variable FOO_BAR_OPT is consulted. The name is
configurable.
- Configuration parameter from outside section is now also used. This
allows putting common parameters.
[REMOVED FEATURES]
- Remove deprecated section naming in configuration variable
('[PROFILE]' and '[SUBCOMMAND PROFILE]'). The correct and supported
naming is now ['profile=PROFILE'] and '[SUBCOMMAND profile=PROFILE]'.
This is already undocumented and deprecated since several releases
ago. This release removes the feature.
[DOCUMENTATION]
- Add section 'Program Flow' and 'Configuration File'.
0.49 2014-11-13 Released-By: PERLANCAR
- Handle arrayifying scalar parameter from config file to array
arguments [GH#3].
- A couple of bug fixes.
0.48 2014-11-12 Released-By: PERLANCAR
- Regard 304 as success aside from 2xx.
0.47 2014-11-12 Released-By: PERLANCAR
- Pass -cmdline_src_ARGNAME and -cmdline_srcfilename_ARGNAME
special hint arguments.
0.46 2014-11-09 Released-By: PERLANCAR
- Introduce request stash keys:
ignore_missing_config_profile_section & read_config_file.
0.45 2014-11-08 Released-By: PERLANCAR
- [ux] Prefix log messages with program name.
0.44 2014-11-07 Released-By: PERLANCAR
- No functional changes.
- [Bugfix] Fix typo in help message.
0.43 2014-11-07 Released-By: PERLANCAR
[ENHANCEMENTS]
- Add logging (currently simple using
Log::Any::Adapter::ScreenColoredLevel, and defaults to off).
- Show extra result in run_completion for debugging (can be seen in JSON
format, for example).
[BUG FIXES]
- Forgot to use Mo's qw/default/ to make default work.
0.42 2014-10-31 Released-By: PERLANCAR
- Tweak help message: show --subcommands when program has
subcommands and doesn't specify one.
0.41 2014-10-30 Released-By: PERLANCAR
- Add support for streaming input and output.
0.40 2014-10-28 Released-By: PERLANCAR
[BUG FIXES]
- Forgot to return response (when status is not 2xx and format is text).
- Avoid perl undef warning.
[ENHANCEMENTS]
- Skip envelope if status is 2xx, not just 200.
- [ux] Bail out if specified config profile is not found.
- Set EOL to empty string when encoding base64, for smaller encoding
result.
0.39 2014-10-25 Released-By: PERLANCAR
- Only do converting of ARG -> ARG:base64 when riap_version is 1.2.
0.38 2014-10-24 Released-By: PERLANCAR
- No functional changes.
- Add example for dealing with binary data.
0.37 2014-10-24 Released-By: PERLANCAR
- No functional changes.
- Avoid perl undef warning.
0.36 2014-10-24 Released-By: PERLANCAR
- Send as-is (no newline) if result is binary and format is text.
- Automatically encode binary/buf arguments when sending to server.
- Allow buf args to have cmdline_src set.
0.35 2014-10-24 Released-By: PERLANCAR
- Add attribute: riap_version.
0.34 2014-10-23 Released-By: PERLANCAR
- No functional changes.
- Typo: unimplemented status is 501, not 502.
0.33 2014-10-16 Released-By: PERLANCAR
- Add hook: before_read_config_file.
0.32 2014-10-09 Released-By: PERLANCAR
- Better error message when metadata does not specify argument schema
(now die with "BUG: Schema not defined for arg $arg").
- Push the use of Perinci::Sub::Args::Argv 0.52 to test whether support
for argument submetadata breaks other stuffs.
0.31 2014-09-17 Released-By: PERLANCAR
- [Bugfix] Didn't set default value of args (from default property
of arg spec or schema default).
- Tweak die string.
0.30 2014-09-16 Released-By: PERLANCAR
- Handle output paging and streaming output (functionality moved from
Perinci::CmdLine).
0.29 2014-09-11 Released-By: PERLANCAR
- Handle arguments with cmdline_src=stdin_line and is_password
(Rinci 1.1.53).
0.28 2014-09-05 Released-By: PERLANCAR
- Fix doc: function metadata is 'cmdline.default_format', not
'x.perinci.cmdline.default_format'.
- 'cmdline.default_format' property in result metadata takes precedence
over function metadata's.
0.27 2014-09-03 Released-By: PERLANCAR
- Handle the case when we must send ARGV instead of args hash (when
parse_args_from_argv returns 501).
0.26 2014-09-03 Released-By: PERLANCAR
- [Bugfix] Ordering.
0.25 2014-09-03 Released-By: PERLANCAR
- No functional change.
- Extract some functionality to Perinci-Access-Lite, to make it easier
to add http support.
0.24 2014-08-29 Released-By: PERLANCAR
- Avoid failure in 00-compile.t [CT].
0.23 2014-08-27 Released-By: PERLANCAR
- Handle cmdline_src argument spec property (functionality moved from
Perinci::CmdLine).
0.22 2014-08-26 Released-By: SHARYANTO
[INCOMPATIBLE CHANGES]
- Change configuration profile syntax from '[PROFILENAME]' to
'[profile=PROFILENAME]' (for use with subcommand: '[SUBCMDNAME
profile=PROFILENAME]'.
0.21 2014-08-25 Released-By: SHARYANTO
- No functional changes.
( run in 0.957 second using v1.01-cache-2.11-cpan-437f7b0c052 )