--- IO-AIO/AIO.pm 2006/10/28 23:32:29 1.86 +++ IO-AIO/AIO.pm 2006/10/29 01:50:29 1.88 @@ -178,6 +178,8 @@ aio request is severed and calling its methods will either do nothing or result in a runtime error). +=back + =cut package IO::AIO; @@ -208,7 +210,7 @@ =head1 FUNCTIONS -=head2 AIO FUNCTIONS +=head2 AIO REQUEST FUNCTIONS All the C calls are more or less thin wrappers around the syscall with the same name (sans C). The arguments are similar or identical, @@ -221,21 +223,25 @@ All functions expecting a filehandle keep a copy of the filehandle internally until the request has finished. -All requests return objects of type L that allow further -manipulation of those requests while they are in-flight. +All functions return request objects of type L that allow +further manipulation of those requests while they are in-flight. The pathnames you pass to these routines I be absolute and -encoded in byte form. The reason for the former is that at the time the +encoded as octets. The reason for the former is that at the time the request is being executed, the current working directory could have changed. Alternatively, you can make sure that you never change the -current working directory. +current working directory anywhere in the program and then use relative +paths. -To encode pathnames to byte form, either make sure you either: a) -always pass in filenames you got from outside (command line, readdir -etc.), b) are ASCII or ISO 8859-1, c) use the Encode module and encode +To encode pathnames as octets, either make sure you either: a) always pass +in filenames you got from outside (command line, readdir etc.) without +tinkering, b) are ASCII or ISO 8859-1, c) use the Encode module and encode your pathnames to the locale (or other) encoding in effect in the user environment, d) use Glib::filename_from_unicode on unicode filenames or e) -use something else. +use something else to ensure your scalar has the correct contents. + +This works, btw. independent of the internal UTF-8 bit, which IO::AIO +handles correctly wether it is set or not. =over 4 @@ -268,7 +274,7 @@ =item aioreq_nice $pri_adjust Similar to C, but subtracts the given value from the current -priority, so effects are cumulative. +priority, so the effect is cumulative. =item aio_open $pathname, $flags, $mode, $callback->($fh)