AnyEvent-Subprocess
view release on metacpan or search on metacpan
{
"abstract" : "flexible, OO, asynchronous process spawning and management",
"author" : [
"Jonathan Rockway <jrockway@cpan.org>"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 4.102342, CPAN::Meta::Converter version 2.101670",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
---
abstract: 'flexible, OO, asynchronous process spawning and management'
author:
- 'Jonathan Rockway <jrockway@cpan.org>'
build_requires:
Scalar::Util: 0
Test::Exception: 0
Test::More: 0
ok: 0
configure_requires:
ExtUtils::MakeMaker: 6.31
dynamic_config: 0
Makefile.PL view on Meta::CPAN
use strict;
use warnings;
use ExtUtils::MakeMaker 6.31;
my %WriteMakefileArgs = (
'ABSTRACT' => 'flexible, OO, asynchronous process spawning and management',
'AUTHOR' => 'Jonathan Rockway <jrockway@cpan.org>',
'BUILD_REQUIRES' => {
'Scalar::Util' => '0',
'Test::Exception' => '0',
'Test::More' => '0',
'ok' => '0'
},
'CONFIGURE_REQUIRES' => {
'ExtUtils::MakeMaker' => '6.31'
},
This archive contains the distribution AnyEvent-Subprocess,
version 1.102912:
flexible, OO, asynchronous process spawning and management
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.
lib/AnyEvent/Subprocess.pm view on Meta::CPAN
package AnyEvent::Subprocess;
BEGIN {
$AnyEvent::Subprocess::VERSION = '1.102912';
}
# ABSTRACT: flexible, OO, asynchronous process spawning and management
use Moose;
with 'AnyEvent::Subprocess::Job';
our $VERSION;
use AnyEvent::Subprocess::DefaultDelegates;
use namespace::autoclean;
__PACKAGE__->meta->make_immutable;
1;
=pod
=head1 NAME
AnyEvent::Subprocess - flexible, OO, asynchronous process spawning and management
=head1 VERSION
version 1.102912
=head1 SYNOPSIS
use AnyEvent::Subprocess;
# prepare the job
lib/AnyEvent/Subprocess.pm view on Meta::CPAN
You can then build upon this; instead of writing your own code to
reading the handles when they become readable and accumulate input,
you can write a delegate that saves all the data coming from a given
handle and gives it to your program after the child exits (via the
C<Done> instance).
(This is also included via the C<CaptureHandle> delegate. See
L<AnyEvent::Subprocess::Job::Delegate::CaptureHandle>.)
All of this integrates into your existing event-based app; waiting for
IO from the child (or waiting for the child to exit) is asynchronous,
and lets your app do other work while waiting for the child. (It can
integrate nicely into Coro, for example, unlike the default C<qx//>.)
=head1 BUGS
The parent's event loop still exists in the child process, which means
you can't safely use it in the child. I have tried to work around
this in a few event loops; my C<AnyEventX::Cancel> module on github is
an early attempt. When that becomes stable, I will remove this
restriction.
( run in 0.380 second using v1.01-cache-2.11-cpan-0d8aa00de5b )