- SEE ALSO
- COPYRIGHT AND LICENSE
IPC::PrettyPipe::Stream::Utils - support utilities for streams
use IPC::PrettyPipe::Stream::Utils qw[ parse_spec ]; $opc = parse_spec( $op );
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
Modeindicates input (I), output (O), or not applicable (?)
Fileindicates whether an additional parameter with a file name is required.
Any resemblance to stream operators used by IPC::Run is purely non-coincidental.
IPC::PrettyPipe::Stream::Utils exports the following functions upon request:
$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
paramwill be set.
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.
Please see those modules/websites for more information related to this module.
Diab Jerius <email@example.com>
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