Skip to content

Commit a658d33

Browse files
author
Jan Henning Thorsen
committed
Add run()
1 parent d2896b4 commit a658d33

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Revision history for Mojo-IOLoop-ReadWriteFork
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()
7+
* Add run(). a simpler version start()
78

89
0.05 Wed Feb 19 13:29:54 2014
910
* Fix "read" event cannot change ERRNO from sysread()

lib/Mojo/IOLoop/ReadWriteFork.pm

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,21 @@ has reactor => sub {
100100

101101
=head1 METHODS
102102
103+
=head2 run
104+
105+
$self = $self->run($program, @program_args);
106+
107+
Simpler version of L</start>.
108+
109+
=cut
110+
111+
sub run {
112+
my ($self, $program, @program_args) = @_;
113+
114+
$self->start(program => $program, program_args => \@program_args);
115+
$self;
116+
}
117+
103118
=head2 start
104119
105120
$self->start(

0 commit comments

Comments
 (0)