On Mon, Nov 24, 2014 at 1:30 PM, Aaron Crane <a...@cpan.org> wrote:
> Bo Lindbergh <2bfj...@gmail.com> wrote:> > Traditionally, an undefined result from fileno() means "not open".> > In situations where the filehandle is open but not associated with> > an OS file descriptor (e.g. PerlIO::scalar), the return value is -1.> > fileno() on dirhandles should be consistent with this and return -1> > in the "open but OS support is lacking" case.>> I don't find this argument entirely convincing, I'm afraid. It's true> that PerlIO::scalar specifically documents this behaviour, but even> so, it feels the need to qualify that by saying "currently fileno($fh)> returns -1". We do, however, return undef for a variety of other> "that's not meaningful" situations.>> That said, this would be a very easy change to make, if the consensus> is that fileno($dirhandle) should be -1 in the absence of OS support.> Any other views on this?>
I think the whole distinction was a mistake anyway. I don't really care
which direction we continue it in.
Leon