On Wed, Jan 26, 2011 at 8:23 AM, Leon Timmermans <fawaka@gmail.com> wrote: > On Wed, Jan 26, 2011 at 11:21 AM, Bo Lindbergh <blgl@stacken.kth.se> > wrote: > > s/fixes/breaks/; > > > > A return value of -1 from a fileno method is not an error indicator; > > it means that there's no operating system file descriptor > > at the bottom of the layer stack (e.g. PerlIO::Scalar). > > > > The current behaviour of pp_fileno is correct since defined(fileno(FOO)) > > is the canonical way of testing whether a filehandle is open. > > The documentation of fileno explicitly disagrees: «Filehandles > connected to memory objects via new features of "open" may return > undefined even though they are open.» It has been in there for 10 > years (b76cc8ba). > > There is a way to check if a filehandle is open, it just hasn't ever > been documented and it is rather obscure (welcome to PerlIO): that's a > good reason to abstract it in openhandle. Overloading fileno with this > never was a good idea IMO. > > Leon > So is the obscure method for checking if a filehandle is open now documented? SteveThread Previous | Thread Next