Catmandu::Fix::cmd - pipe data to be fixed through an external process
Version 0.0201
This fix passes data as a JSON object to an external process over stdin and reads a JSON object from it's stdout.
my $fixer = Catmandu::Fix->new(fixes => [ # pipe data through the jq command-line json processor # keeping only the title field 'cmd("jq -c -M {title}")', # ... ]); # a canonical external program in perl use JSON; while (<STDIN>) { my $data = decode_json($_); # ... print encode_json($data); }
Catmandu::Fix
Nicolas Steenlant, <nicolas.steenlant at ugent.be>
<nicolas.steenlant at ugent.be>
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Catmandu::Fix::cmd, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu::Fix::cmd
CPAN shell
perl -MCPAN -e shell install Catmandu::Fix::cmd
For more information on module installation, please visit the detailed CPAN module installation guide.