--- IO-AIO/AIO.pm 2005/07/10 22:19:54 1.7 +++ IO-AIO/AIO.pm 2005/07/10 22:20:55 1.9 @@ -14,7 +14,7 @@ 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 @@ -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