NAME
IPC::PrettyPipe::Stream::Utils - support utilities for streams
VERSION
version 0.13
SYNOPSIS
$opc
= parse_spec(
$op
);
DESCRIPTION
Stream Specification
A stream specification is a string which may take one of the forms in the Spec column:
Spec Op Mode File Function
---- --- ---- ---- -----------------------
< < I y
read
from file via fd 0
<N < I y
read
from file via fd N
> > O y
write
to file via fd 1
>N > O y
write
to file via fd N
>& >& O n redirect fd 2 to fd 1
&> &> O n redirect fd 2 to fd 1
N<&- <&- ? n
close
fd N
M<
&N
<& I n dup fd M as fd N
N>
&M
>& O n dup fd M as fd N
where
M and N are integers indicating file descriptors
Mode
indicates input (I), output (O), or not applicable (?)File
indicates whether an additional parameter with a file name is required.
Any resemblance to stream operators used by IPC::Run is purely non-coincidental.
FUNCTIONS
IPC::PrettyPipe::Stream::Utils exports the following functions upon request:
- parse_spec
-
$components
= parse_spec(
$spec
)
Parse a stream specification into components Op, N, and M. Returns a hashref with the information indexed by the component names.
If the specification indicates that additional parameters are required (such as the name of a file to be read or written to), the key
param
will be set.
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
and may be cloned from
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