--- IO-AIO/AIO.pm 2011/09/29 22:42:15 1.212 +++ IO-AIO/AIO.pm 2011/10/01 10:48:04 1.214 @@ -1306,8 +1306,9 @@ Everywhere where a pathname is accepted by IO::AIO (e.g. in C or C), one can specify an array reference with an IO::AIO::WD -object and a pathname instead. If the pathname is absolute, the -IO::AIO::WD objetc is ignored, otherwise the pathname is resolved relative +object and a pathname instead (or the IO::AIO::WD object alone, which +gets interpreted as C<[$wd, "."]>). If the pathname is absolute, the +IO::AIO::WD object is ignored, otherwise the pathname is resolved relative to that IO::AIO::WD object. For example, to get a wd object for F and then stat F @@ -1325,8 +1326,16 @@ }; }; -This shows that creating an IO::AIO::WD object is itself a potentially -blocking operation, which is why it is done asynchronously. +That C is a request and not a normal function shows that creating +an IO::AIO::WD object is itself a potentially blocking operation, which is +why it is done asynchronously. + +To stat the directory obtained with C above, one could write +either of the following three request calls: + + aio_lstat "/etc" , sub { ... # pathname as normal string + aio_lstat [$wd, "."], sub { ... # "." relative to $wd (i.e. $wd itself) + aio_lstat $wd , sub { ... # shorthand for the previous As with normal pathnames, IO::AIO keeps a copy of the working directory object and the pathname string, so you could write the following without