The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

IPC::PrettyPipe::Execute::IPC::Run - execution backend using IPC::Run

VERSION

version 0.10

SYNOPSIS

  use IPC::PrettyPipe::DSL;

  my $pipe = ppipe 'ls';
  $pipe->executor( 'IPC::Run' );

  # or, more explicitly
  my $executor = IPC::PrettyPipe::Execute::IPC::Run->new;
  $pipe->executor( $executor );

DESCRIPTION

IPC::PrettyPipe::Execute::IPC::Run implements the IPC::PrettyPipe::Executor role, providing an execution backend for IPC::PrettyPipe using the IPC::Run module.

It does not support inner pipes with non-default streams. For example, this is supported:

  ppipe [ 'cmd1' ],
        [ ppipe ['cmd2.1'],
                ['cmd2.2'],
        ],
        '>', $file;

while this is not:

  ppipe [ 'cmd1' ],
        [ ppipe ['cmd2.1'],
                ['cmd2.2'],
               '>', $file
        ];

It also provides proxied access to the IPC::Run start, pump, and finish methods. (It does not provide direct access to the IPC::Run harness object).

When using the proxied methods, the caller must ensure that the "finish" method is invoked to ensure that the parent processes' file descriptors are properly restored.

ATTRIBUTES

pipe

The IPC::PrettyPipe object which will provide the commands

Methods

run

Run the pipeline.

start

Invoke the IPC::Run start method.

pump

Invoke the IPC::Run pump method.

finish

Invoke the IPC::Run finish method.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=IPC-PrettyPipe or by email to bug-IPC-PrettyPipe@rt.cpan.org.

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.

SOURCE

The development version is on github at https://github.com/djerius/ipc-prettypipe and may be cloned from git://github.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