ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/AIO.pm
(Generate patch)

Comparing IO-AIO/AIO.pm (file contents):
Revision 1.23 by root, Fri Jul 22 08:25:22 2005 UTC vs.
Revision 1.25 by root, Sun Jul 31 21:21:12 2005 UTC

63use base 'Exporter'; 63use base 'Exporter';
64 64
65use Fcntl (); 65use Fcntl ();
66 66
67BEGIN { 67BEGIN {
68 $VERSION = '1.0'; 68 $VERSION = 1.1;
69 69
70 @EXPORT = qw(aio_read aio_write aio_open aio_close aio_stat aio_lstat aio_unlink 70 @EXPORT = qw(aio_read aio_write aio_open aio_close aio_stat aio_lstat aio_unlink
71 aio_fsync aio_fdatasync aio_readahead); 71 aio_fsync aio_fdatasync aio_readahead);
72 @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel max_outstanding nreqs); 72 @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel max_outstanding nreqs);
73 73
316 return undef if $_[0] < 0; 316 return undef if $_[0] < 0;
317 317
318 # try to generate nice filehandles 318 # try to generate nice filehandles
319 my $sym = "IO::AIO::fd#$_[0]"; 319 my $sym = "IO::AIO::fd#$_[0]";
320 local *$sym; 320 local *$sym;
321 open *$sym, "+<&=$_[0]" 321
322 open *$sym, "+<&$_[0]" # usually under any unix
323 or open *$sym, "<&$_[0]" # cygwin needs this
324 or open *$sym, ">&$_[0]" # cygwin needs this
322 or return undef; 325 or return undef;
323 326
324 *$sym 327 *$sym
325} 328}
326 329

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines