# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #35847] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=35847 >
This is a bug report for perl from [EMAIL PROTECTED], generated with the help of perlbug 1.34 running under perl v5.8.3. ----------------------------------------------------------------- The use of lstat() is not guaranteed in File::Find, contrary to its documentation. >> FAQ 3.4: How do I find which modules are installed on my system? > > It shouldn't matter. From "perldoc File::Find" (v. 1.07): > > * It is guaranteed that an lstat has been called before the > user's "wanted()" function is called. This enables fast file > checks involving _. Not in all cases. lstat() does not always occur in directories that don't have any subdirectories. linux% cd ~/bin # Do not run test with . = dir-with-too-many-files linux% cat ../temp.pl use File::Find; $File::Find::dont_use_nlink = $ARGV[0]; my @files; find sub { push @files, $File::Find::name if -f _ && /\.pm$/ }, @INC; print join "\n", @files,''; linux% perl ../temp.pl 0 | wc -l 434 linux% perl ../temp.pl 1 | wc -l 943 linux% perl -v This is perl, v5.8.3 built for i586-linux linux% diff -u Find.pm.orig Find.pm --- Find.pm.orig 2004-02-27 08:31:34.000000000 -0800 +++ Find.pm 2005-05-17 02:39:04.000000000 -0700 @@ -120,8 +120,11 @@ =item * -It is guaranteed that an I<lstat> has been called before the user's -C<wanted()> function is called. This enables fast file checks involving S< _>. +Previous versions of File::Find were guaranteed to call an I<lstat> +before the user's C<wanted()> function was called, but this is no +longer the case. Since this depends on File::Find::done_use_nlink, $^O, +and other factors, fast file checks involving S< _> are not recommended +unless C<wanted()> calls I<lstat> first. =item * [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=library severity=low --- Site configuration information for perl v5.8.3: Configured by jms at Tue Feb 17 02:18:23 PST 2004. Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration: Platform: osname=linux, osvers=2.4.20-28.9, archname=i586-linux uname='linux mathras 2.4.20-28.9 #1 thu dec 18 13:46:46 est 2003 i586 i586 i386 gnulinux ' config_args='-der' hint=previous, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-strict-aliasing -I/usr/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O3', cppflags='-fno-strict-aliasing -I/usr/include -I/usr/include/gdbm -fno-strict-aliasing -I/usr/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm' ccversion='', gccversion='3.2.2 20030222 (Red Hat Linux 3.2.2-5)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/lib' libpth=/usr/lib /lib libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.3.2' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fpic', lddlflags='-shared -L/usr/lib' Locally applied patches: --- @INC for perl v5.8.3: /usr/lib/perl5/5.8.3/i586-linux /usr/lib/perl5/5.8.3 /usr/lib/perl5/site_perl/5.8.3/i586-linux /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl . --- Environment for perl v5.8.3: HOME=/home/jms LANG=en_US LANGUAGE (unset) LANGVAR=en_US LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin:/home/jms/bin PERL_BADLANG (unset) SHELL=/bin/tcsh