Skip to content

Commit

Permalink
use a more appropriate mode string
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 15, 2015
1 parent 230bebd commit 1d72d7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Mojo/Reactor/EV.pm
Expand Up @@ -83,7 +83,7 @@ Mojo::Reactor::EV - Low-level event reactor with libev support
# Turn file descriptor into handle and watch if it becomes readable or
# writable
my $reactor = Mojo::Reactor::EV->new;
my $handle = IO::Handle->new_from_fd($fd, 'r');
my $handle = IO::Handle->new_from_fd($fd, 'r+');
$reactor->io($handle => sub {
my ($reactor, $writable) = @_;
say $writable ? 'Handle is writable' : 'Handle is readable';
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Reactor/Poll.pm
Expand Up @@ -144,7 +144,7 @@ Mojo::Reactor::Poll - Low-level event reactor with poll support
# Turn file descriptor into handle and watch if it becomes readable or
# writable
my $reactor = Mojo::Reactor::Poll->new;
my $handle = IO::Handle->new_from_fd($fd, 'r');
my $handle = IO::Handle->new_from_fd($fd, 'r+');
$reactor->io($handle => sub {
my ($reactor, $writable) = @_;
say $writable ? 'Handle is writable' : 'Handle is readable';
Expand Down

0 comments on commit 1d72d7a

Please sign in to comment.