On Sat, Dec 18, 2004 at 05:56:16PM +0000, [EMAIL PROTECTED] wrote: > :I concur, and i'm sorry i didn't expres that more clearly; > :ideally 'lstat' is fixed... but it was 'fixed' to produce the behaviour > :above... > : > :The patch of course is more of a stopgap measure, but at least one > :that will work with already released perls. > > Redoing the lstat() if not needed is expensive; a preferable stopgap > would be to avoid the loop where symlinks are not supported.
That's shoving the problem into the user's lap in the name of optimization. The loop is deep inside File::Find. Not something which is easily avoided or even known about by the user to avoid until it blows up in their face. The code, as written, is perfectly acceptable even on filesystems which do not have symlinks. Its asking is "is the last thing I lstat'd a symlink" to which the answer on systems which do not have symlinks is always going to be "no". Thus the implementation of -l on those systems should be pretty simple. The moral equivalent to "return 0". And that would fix the problem. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/ Death? Its like being on holiday with a group of Germans.