IPC-Run

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN


    File descriptor numbers are not permitted to the left or the right of
    these operators, and the '&' may occur on either end of the operator.

    The '&>pipe' and '>pipe&' variants behave like the '>pipe' operator, except
    that both stdout and stderr write to the created pipe.

- Redirection Filters

    Both input redirections and output redirections that use scalars or
    subs as endpoints may have an arbitrary number of filter subs placed
    between them and the child process.  This is useful if you want to
    receive output in chunks, or if you want to massage each chunk of
    data sent to the child.  To use this feature, you must use operator
    syntax:

        run(
           \@cmd
              '<', \&in_filter_2, \&in_filter_1, $in,
              '>', \&out_filter_1, \&in_filter_2, $out,
        );

README.md  view on Meta::CPAN

            my $h = harness(\@cmd);
            $h->start;
            # ... do other work, pump $h as needed ...
            if ( $h->finished ) {
                print "Exit code: ", $h->result(0), "\n";
            }

# FILTERS

These filters are used to modify input our output between a child
process and a scalar or subroutine endpoint.

- binary

        run \@cmd, ">", binary, \$out;
        run \@cmd, ">", binary, \$out;  ## Any TRUE value to enable
        run \@cmd, ">", binary 0, \$out;  ## Any FALSE value to disable

    This is a constructor for a "binmode" "filter" that tells IPC::Run to keep
    the carriage returns that would ordinarily be edited out for you (binmode
    is usually off).  This is not a real filter, but an option masquerading as

README.md  view on Meta::CPAN

Support for `\@sub_cmd` as an argument to a command which
gets replaced with /dev/fd or the name of a temporary file containing foo's
output.  This is like <(sub\_cmd ...) found in bash and csh (IIRC).

Allow multiple harnesses to be combined as independent sets of processes
in to one 'meta-harness'.

Allow a harness to be passed in place of an \\@cmd.  This would allow
multiple harnesses to be aggregated.

Ability to add external file descriptors w/ filter chains and endpoints.

Ability to add timeouts and timing generators (i.e. repeating timeouts).

High resolution timeouts.

# Win32 LIMITATIONS

- argument-passing rules are program-specific

    Win32 programs receive all arguments in a single "command line" string.

lib/IPC/Run.pm  view on Meta::CPAN


File descriptor numbers are not permitted to the left or the right of
these operators, and the '&' may occur on either end of the operator.

The '&>pipe' and '>pipe&' variants behave like the '>pipe' operator, except
that both stdout and stderr write to the created pipe.

=item Redirection Filters

Both input redirections and output redirections that use scalars or
subs as endpoints may have an arbitrary number of filter subs placed
between them and the child process.  This is useful if you want to
receive output in chunks, or if you want to massage each chunk of
data sent to the child.  To use this feature, you must use operator
syntax:

   run(
      \@cmd
         '<', \&in_filter_2, \&in_filter_1, $in,
         '>', \&out_filter_1, \&in_filter_2, $out,
   );

lib/IPC/Run.pm  view on Meta::CPAN


=pod

=back

=back

=head1 FILTERS

These filters are used to modify input our output between a child
process and a scalar or subroutine endpoint.

=over

=item binary

   run \@cmd, ">", binary, \$out;
   run \@cmd, ">", binary, \$out;  ## Any TRUE value to enable
   run \@cmd, ">", binary 0, \$out;  ## Any FALSE value to disable

This is a constructor for a "binmode" "filter" that tells IPC::Run to keep

lib/IPC/Run.pm  view on Meta::CPAN

Support for C<\@sub_cmd> as an argument to a command which
gets replaced with /dev/fd or the name of a temporary file containing foo's
output.  This is like <(sub_cmd ...) found in bash and csh (IIRC).

Allow multiple harnesses to be combined as independent sets of processes
in to one 'meta-harness'.

Allow a harness to be passed in place of an \@cmd.  This would allow
multiple harnesses to be aggregated.

Ability to add external file descriptors w/ filter chains and endpoints.

Ability to add timeouts and timing generators (i.e. repeating timeouts).

High resolution timeouts.

=head1 Win32 LIMITATIONS

=over

=item argument-passing rules are program-specific



( run in 2.785 seconds using v1.01-cache-2.11-cpan-524268b4103 )