Catmandu::Fix::cmd(3pm)

Catmandu::Fix::cmd3pm

Pipe data to be fixed through an external process

Usage

    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);
    }

Version

Version 0.0201

Overview

This fix passes data as a JSON object to an external process over stdin and reads a JSON object from it's stdout.

Releases

Unchanged in 2 releases since Debian 12 (Bookworm).

  1. 12–13

Author

Nicolas Steenlant, "<nicolas.steenlant at ugent.be>"

From libcatmandu-fix-cmd-perl 0.0201-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.