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.50 by root, Sat Jun 24 16:27:02 2006 UTC vs.
Revision 1.51 by root, Sat Jun 24 19:14:04 2006 UTC

61=cut 61=cut
62 62
63package IO::AIO; 63package IO::AIO;
64 64
65no warnings; 65no warnings;
66use strict 'vars';
66 67
67use base 'Exporter'; 68use base 'Exporter';
68 69
69use Fcntl ();
70
71BEGIN { 70BEGIN {
72 $VERSION = '1.8'; 71 our $VERSION = '1.8';
73 72
74 @EXPORT = qw(aio_sendfile aio_read aio_write aio_open aio_close aio_stat 73 our @EXPORT = qw(aio_sendfile aio_read aio_write aio_open aio_close aio_stat
75 aio_lstat aio_unlink aio_rmdir aio_readdir aio_scandir aio_symlink 74 aio_lstat aio_unlink aio_rmdir aio_readdir aio_scandir aio_symlink
76 aio_fsync aio_fdatasync aio_readahead aio_rename aio_link aio_move); 75 aio_fsync aio_fdatasync aio_readahead aio_rename aio_link aio_move);
77 @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel 76 our @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel max_outstanding nreqs);
78 max_outstanding nreqs);
79 77
80 require XSLoader; 78 require XSLoader;
81 XSLoader::load IO::AIO, $VERSION; 79 XSLoader::load ("IO::AIO", $VERSION);
82} 80}
83 81
84=head1 FUNCTIONS 82=head1 FUNCTIONS
85 83
86=head2 AIO FUNCTIONS 84=head2 AIO FUNCTIONS
191 189
192sub aio_move($$$) { 190sub aio_move($$$) {
193 my ($src, $dst, $cb) = @_; 191 my ($src, $dst, $cb) = @_;
194 192
195 aio_rename $src, $dst, sub { 193 aio_rename $src, $dst, sub {
196 if ($_[0] && $! == Errno::EXDEV) { 194 if ($_[0] && $! == EXDEV) {
197 aio_open $src, O_RDONLY, 0, sub { 195 aio_open $src, O_RDONLY, 0, sub {
198 if (my $src_fh = $_[0]) { 196 if (my $src_fh = $_[0]) {
199 my @stat = stat $src_fh; 197 my @stat = stat $src_fh;
200 198
201 aio_open $dst, O_WRONLY, 0200, sub { 199 aio_open $dst, O_WRONLY, 0200, sub {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines