--- IO-AIO/AIO.pm 2005/07/10 22:19:48 1.6 +++ IO-AIO/AIO.pm 2005/07/10 22:20:55 1.9 @@ -14,12 +14,12 @@ aio_unlink "/tmp/file", sub { }; aio_read $fh, 30000, 1024, $buffer, 0, sub { - $_[0] >= 0 or die "read error: $!"; + $_[0] > 0 or die "read error: $!"; }; # Event Event->io (fd => IO::AIO::poll_fileno, - poll => 'r', async => 1, + poll => 'r', cb => \&IO::AIO::poll_cb); # Glib/Gtk2 @@ -130,8 +130,8 @@ offset C<0> within the scalar: aio_read $fh, 7, 15, $buffer, 0, sub { - $_[0] >= 0 or die "read error: $!"; - print "read <$buffer>\n"; + $_[0] > 0 or die "read error: $!"; + print "read $_[0] bytes: <$buffer>\n"; }; =item aio_readahead $fh,$offset,$length, $callback