IPC::PrettyPipe

Connecting a series of programs via pipes is a time honored tradition.
When it comes to displaying them for debug or informational purposes,
simple dumps may suffice for simple pipelines, but when the number of
programs and arguments grows large, it can become difficult to
understand the overall structure of the pipeline.

IPC::PrettyPipe provides a mechanism to construct and output readable
external command execution pipelines. It does this by treating commands,
their options, and the options' values as separate entities so that it
can produce nicely formatted output.

It is designed to be used in conjunction with other modules which
actually execute pipelines, such as IPC::Run.

This module (and its siblings IPC::PrettyPipe::Cmd,
IPC::PrettyPipe::Arg, and IPC::PrettyPipe::Stream) present the
object-oriented interface for manipulating the underlying
infrastructure.

For a simpler, more intuitive means of constructing pipelines, see
IPC::PrettyPipe::DSL.

  Pipeline Rendering (Pretty Printing)

IPC::PrettyPipe doesn't render a pipeline directly; instead it passes
that job on to another object (which must consume the
IPC::PrettyPipe::Renderer role).

By default IPC::PrettyPipe provides a renderer which uses Template::Tiny
to render a pipeline as if it were to be fed to a POSIX shell (which can
be handy for debugging complex pipelines).

The same renderer may be fed a different template to use, or it may be
replaced via the "renderer" attribute.

  Pipeline Execution

Just as with rendering, IPC::PrettyPipe doesn't execute a pipeline on
its own. Instead it calls upon another object (which must consume the
IPC::PrettyPipe::Executor role). By default it provides an executor
which uses IPC::Run to run the pipeline. The executor may be replaced
via the "executor" attribute.

  Rewriting Commands' argument values

Sometimes it's not possible to fill in an argument's value until after a
pipeline has been created. The "valsubst" method allows altering them
after the fact.

INSTALLATION

This is a Perl module distribution. It should be installed with whichever
tool you use to manage your installation of Perl, e.g. any of

  cpanm .
  cpan  .
  cpanp -i .

Consult http://www.cpan.org/modules/INSTALL.html for further instruction.
Should you wish to install this module manually, the procedure is

  perl Makefile.PL
  make
  make test
  make install

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