Skip to content

Commit e6080b1

Browse files
author
Jan Henning Thorsen
committed
Released version 0.06
* Fix "Use of uninitialized value in numeric eq (==) at ReadWriteFork.pm line 182." * Add support for write() before child process has started * Add support for "drain" callback to write() * Add run(). a simpler version start() * Add close() for closing STDIN
1 parent ad5a1fc commit e6080b1

File tree

4 files changed

+84
-7
lines changed

4 files changed

+84
-7
lines changed

Changes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Revision history for Mojo-IOLoop-ReadWriteFork
22

3-
0.06
3+
0.06 Mon Aug 11 16:59:18 2014
44
* Fix "Use of uninitialized value in numeric eq (==) at ReadWriteFork.pm line 182."
55
* Add support for write() before child process has started
66
* Add support for "drain" callback to write()

MANIFEST.SKIP

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,62 @@
1-
#!include_default
1+
2+
#!start included /home/jhthorsen/.perlbrew/perls/perl-5.18.2/lib/5.18.2/ExtUtils/MANIFEST.SKIP
3+
# Avoid version control files.
4+
\bRCS\b
5+
\bCVS\b
6+
\bSCCS\b
7+
,v$
8+
\B\.svn\b
9+
\B\.git\b
10+
\B\.gitignore\b
11+
\b_darcs\b
12+
\B\.cvsignore$
13+
14+
# Avoid VMS specific MakeMaker generated files
15+
\bDescrip.MMS$
16+
\bDESCRIP.MMS$
17+
\bdescrip.mms$
18+
19+
# Avoid Makemaker generated and utility files.
20+
\bMANIFEST\.bak
21+
\bMakefile$
22+
\bblib/
23+
\bMakeMaker-\d
24+
\bpm_to_blib\.ts$
25+
\bpm_to_blib$
26+
\bblibdirs\.ts$ # 6.18 through 6.25 generated this
27+
28+
# Avoid Module::Build generated and utility files.
29+
\bBuild$
30+
\b_build/
31+
\bBuild.bat$
32+
\bBuild.COM$
33+
\bBUILD.COM$
34+
\bbuild.com$
35+
36+
# Avoid temp and backup files.
37+
~$
38+
\.old$
39+
\#$
40+
\b\.#
41+
\.bak$
42+
\.tmp$
43+
\.#
44+
\.rej$
45+
46+
# Avoid OS-specific files/dirs
47+
# Mac OSX metadata
48+
\B\.DS_Store
49+
# Mac OSX SMB mount metadata files
50+
\B\._
51+
52+
# Avoid Devel::Cover and Devel::CoverX::Covered files.
53+
\bcover_db\b
54+
\bcovered\b
55+
56+
# Avoid MYMETA files
57+
^MYMETA\.
58+
#!end included /home/jhthorsen/.perlbrew/perls/perl-5.18.2/lib/5.18.2/ExtUtils/MANIFEST.SKIP
59+
260
\.swp$
361
^local/
462
^MANIFEST\.SKIP

README

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ NAME
22
Mojo::IOLoop::ReadWriteFork - Fork a process and read/write from it
33

44
VERSION
5-
0.05
5+
0.06
66

77
DESCRIPTION
88
This class enable you to fork children which you can write data to and
@@ -62,6 +62,16 @@ ATTRIBUTES
6262
Mojo::IOLoop->singleton->reactor;
6363

6464
METHODS
65+
close
66+
$self = $self->close("stdin");
67+
68+
Close STDIN stream to the child process immediately.
69+
70+
run
71+
$self = $self->run($program, @program_args);
72+
73+
Simpler version of "start".
74+
6575
start
6676
$self->start(
6777
program => sub { my @program_args = @_; ... },
@@ -82,9 +92,18 @@ METHODS
8292
"pty".
8393

8494
write
85-
$self->write($buffer);
95+
$self = $self->write($chunk);
96+
$self = $self->write($chunk, $cb);
97+
98+
Used to write data to the child process STDIN. An optional callback will
99+
be called once STDIN is drained.
86100

87-
Used to write data to the child process.
101+
Example:
102+
103+
$self->write("some data\n", sub {
104+
my ($self) = @_;
105+
$self->close;
106+
});
88107

89108
kill
90109
$bool = $self->kill;

lib/Mojo/IOLoop/ReadWriteFork.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Mojo::IOLoop::ReadWriteFork - Fork a process and read/write from it
66
77
=head1 VERSION
88
9-
0.05
9+
0.06
1010
1111
=head1 DESCRIPTION
1212
@@ -59,7 +59,7 @@ use constant CHUNK_SIZE => $ENV{MOJO_CHUNK_SIZE} || 131072;
5959
use constant DEBUG => $ENV{MOJO_READWRITE_FORK_DEBUG} || 0;
6060
use constant WAIT_PID_INTERVAL => $ENV{WAIT_PID_INTERVAL} || 0.01;
6161

62-
our $VERSION = '0.05';
62+
our $VERSION = '0.06';
6363

6464
=head1 EVENTS
6565

0 commit comments

Comments
 (0)