AnyEvent::Subprocess::Job::Delegate::Handle - share a filehandle or socket with the child
'r' for a pipe from the child to the parent, 'w' for a pipe from the parent to the child, 'rw' for a socket.
can be a Perl filehandle (
\*STDERR) or integer fd number (
This filehandle will be opened to the object created by this delegate in the child.
(So if you say
direction => 'r',
replace => \*STDERR,
the parent will be able to read the child's STDERR via this delegate.
If you say
direction => 'w',
replace => 3,
then the child can open fd #3 and read from the parent.)
If you don't want to replace a filehandle or file descriptor number, you can just pass the filehandle object to the child instead. If you set this to true, the child will get its end of the socket or pipe in the argument hash passed to the child coderef. The key will be the same as the name the delegate.
This is the AnyEvent::Subprocess::Handle object that you use to communicate with the child.
You typically want to
but all of AnyEvent::Handle's operations are available.
See that manpage for further details; there is a lot you can do,
and this module makes it all very easy.
Jonathan Rockway <firstname.lastname@example.org>
This software is copyright (c) 2011 by Jonathan Rockway.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.