NAME
IPC::PrettyPipe::Render::Struct - rendering a pipe as Perl structures
VERSION
version 0.13
SYNOPSIS
use IPC::PrettyPipe::DSL;
my $pipe = ppipe 'ls';
$pipe->renderer( 'Struct' );
# or, more explicitly
my $renderer = IPC::PrettyPipe::Render::Struct->new;
$pipe->renderer( $renderer );
DESCRIPTION
IPC::PrettyPipe::Render::Struct provides a rendering backend for IPC::PrettyPipe which returns Perl data structures representing the pipe.
Data Structure Layout
Pipes
A pipe is represented as a hash, with the following entries:
elements
-
An array containing commands or pipes
streams
-
An array containing streams. Optional
Commands
A command is represented as a hash with the following entries:
cmd
-
The command
args
-
An array containing rendered arguments (see "render" in IPC::PrettyPipe::Args). Optional
streams
-
An array containing streams. Optional
Streams
Streams are represented as an array. Each element of the array is itself an array with the following elements, in order:
the stream specification
a file name Optional
METHODS
new
$renderer = IPC::PrettyPipe::Render::Template::Tiny->new( %attr );
Construct a new renderer. Typically this is done automatically by IPC::PrettyPipe.
render
$renderer->render( $pipe );
SUPPORT
Bugs
Please report any bugs or feature requests to bug-ipc-prettypipe@rt.cpan.org or through the web interface at: https://rt.cpan.org/Public/Dist/Display.html?Name=IPC-PrettyPipe
Source
Source is available at
https://gitlab.com/djerius/ipc-prettypipe
and may be cloned from
https://gitlab.com/djerius/ipc-prettypipe.git
SEE ALSO
Please see those modules/websites for more information related to this module.
AUTHOR
Diab Jerius <djerius@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2018 by Smithsonian Astrophysical Observatory.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007