Process::Async::Worker - base class for IO::Async::Loop-using subprocess
version 0.003
Provides the base class for a worker implementation.
Subclasses must provide this method.
sub run { my ($self, $loop) = @_; $self->send_command('started'); $loop->add(my $ua = Net::Async::HTTP->new); $ua->GET('http://example.com')->get; }
Accessor for the STDIO IO::Async::Stream.
Handler for incoming STDIN events.
By default, this extracts lines and dispatches the first word as cmd_$word method, if available, or calls "on_command" if not found.
cmd_$word
Subclasses should override this to provide custom behaviour.
Sets up an IO::Async::Stream for STDIO when we're added to the event loop.
add_child, adopt_future, can_event, children, configure, configure_unknown, debug_printf, get_loop, invoke_error, invoke_event, loop, make_event_cb, maybe_invoke_event, maybe_make_event_cb, new, notifier_name, parent, remove_child, remove_from_parent
Tom Molesworth <cpan@perlsite.co.uk>
Copyright Tom Molesworth 2014-2015. Licensed under the same terms as Perl itself.
To install Process::Async, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Process::Async
CPAN shell
perl -MCPAN -e shell install Process::Async
For more information on module installation, please visit the detailed CPAN module installation guide.