AnyEvent-Proc
view release on metacpan or search on metacpan
lib/AnyEvent/Proc.pm view on Meta::CPAN
In fact, the method equals to
$proc->fire(0)
=head2 wait([$callback])
Waits for the subprocess to be finished call the callback with the exit code. Returns a condvar.
Without callback, this is a synchronous call directly returning the exit code.
=head2 finish()
Closes STDIN of subprocess
=head2 end()
Closes all handles of subprocess
=head2 stop_timeout()
Stopps read/write timeout for STDIN, STDOUT and STDERR.
See I<timeout> and I<on_timeout> options in I<new()>.
=head2 stop_wtimeout()
Stopps write timeout for STDIN.
See I<wtimeout> and I<on_wtimeout> options in I<new()>.
=head2 stop_rtimeout()
Stopps read timeout for STDIN.
See I<rtimeout> and I<on_rtimeout> options in I<new()>.
=head2 stop_etimeout()
Stopps read timeout for STDIN.
See I<etimeout> and I<on_etimeout> options in I<new()>.
=head2 write($scalar)
Queues the given scalar to be written.
=head2 write($type => @args)
See L<AnyEvent::Handle>::push_write for more information.
=head2 writeln(@lines)
Queues one or more line to be written.
=head2 pipe([$fd, ]$peer)
Pipes any output of STDOUT to another handle. C<$peer> maybe another L<AnyEvent::Proc> instance, an L<AnyEvent::Handle>, a L<Coro::Channel>, an object that implements the I<print> method (like L<IO::Handle>, including any subclass), a ScalarRef or a ...
C<$fd> defaults to I<stdout>.
$proc->pipe(stderr => $socket);
=head2 pull($peer)
Pulls any data from another handle to STDIN. C<$peer> maybe another L<AnyEvent::Proc> instance, an L<AnyEvent::Handle>, an L<IO::Handle> (including any subclass), a L<Coro::Channel>, a ScalarRef or a GlobRef.
$proc->pull($socket);
=head2 readline_cb($callback)
Reads a single line from STDOUT and calls C<$callback>
=head2 readline_cv([$condvar])
Reads a single line from STDOUT and send the result to C<$condvar>. A condition variable will be created and returned, if C<$condvar> is omitted.
=head2 readline_ch([$channel])
Reads a singe line from STDOUT and put the result to coro channel C<$channel>. A L<Coro::Channel> will be created and returned, if C<$channel> is omitted.
=head2 readlines_cb($callback)
Read lines continiously from STDOUT and calls on every line the handler C<$callback>.
=head2 readlines_ch([$channel])
Read lines continiously from STDOUT and put every line to coro channel C<$channel>. A L<Coro::Channel> will be created and returned, if C<$channel> is omitted.
=head2 readline()
Reads a single line from STDOUT synchronously and return the result.
Same as
$proc->readline_cv->recv
=head2 readline_error_cb($callback)
Bevahes equivalent as I<readline_cb>, but for STDERR.
=head2 readline_error_cv([$condvar])
Bevahes equivalent as I<readline_cv>, but for STDERR.
=head2 readline_error_ch([$channel])
Bevahes equivalent as I<readline_ch>, but for STDERR.
=head2 readlines_error_cb($callback)
Bevahes equivalent as I<readlines_cb>, but for STDERR.
=head2 readlines_error_ch([$channel])
Bevahes equivalent as I<readlines_ch>, but for STDERR.
=head2 readline_error()
Bevahes equivalent as I<readline>, but for STDERR.
=head1 FUNCTIONS
( run in 1.891 second using v1.01-cache-2.11-cpan-39bf76dae61 )