Steven Haryanto > Perinci-CmdLine > strip-result-env-yaml

Download:
Perinci-CmdLine-1.08.tar.gz

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

strip-result-env-yaml - Strip result envelope (YAML version)

VERSION ^

version 1.08

SYNOPSIS ^

 % cmdline-script ... --format=yaml | strip-result-env-yaml

DESCRIPTION ^

This is a simple utility to strip result envelope (that is, the status and message). It will change:

 [200, "OK", {foo: bar}]
 [405, "Not found"]
 [200, "OK", "result", {result_metadata1: "val"}]

to:

 {foo: bar}
 ~
 "result"

It accepts and outputs YAML (parsing is done with YAML::Syck Perl module). It passes data unchanged if input data is not enveloped result. It dies on error.

SEE ALSO ^

Perinci::CmdLine

HOMEPAGE ^

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

SOURCE ^

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

BUGS ^

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

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 ^

Steven Haryanto <stevenharyanto@gmail.com>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2014 by Steven Haryanto.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: