[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

[perl #59750] File::Find behavior with files among @DIRS



# New Ticket Created by  jflack@math.purdue.edu 
# Please include the string:  [perl #59750]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=59750 >



This is a bug report for perl from jflack@math.purdue.edu,
generated with the help of perlbug 1.35 running under perl v5.8.8.


-----------------------------------------------------------------
The File::Find documentation never mentions any possibility of
including non-directories among @DIRS, but it seems to be
possible and the resulting behavior seems to be about what one
would hope for: preprocess and postprocess don't get called,
but wanted gets called with $File::Find::dir containing the
directory name and $_ containing the bare file name. This is
useful behavior (in the sense that if you wanted to write a
script that could accept a mix of file and directory arguments,
and File::Find /didn't/ do this, you'd have to write a fairly
fiddly wrapper around File::Find to accomplish the same thing).

So, unless there is a really strong objection to documenting the
current behavior (or on some platforms it actually won't work),
it would be nice to document it so people know it's available.

There is one small point where the behavior for a non-directory
in @DIRS differs from the normal behavior: $File::Find::dir
winds up with a terminal / where normally it does not. Nothing
the user can't work around with a File::Spec->canonpath, but
it might be nice to make it consistent.



[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=library
    severity=wishlist
---
Site configuration information for perl v5.8.8:

Configured by comand at Fri Oct  5 12:18:43 EDT 2007.

Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Platform:
    osname=solaris, osvers=2.8, archname=sun4-solaris-thread-multi
    uname='sunos ra 5.8 generic_117350-46 sun4u sparc sunw,sun-blade-1000'
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -xO3 -xarch=v8 -xspace -xildoff -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-xO3 -xarch=v8 -xspace -xildoff',
    cppflags='-D_REENTRANT -xO3 -xarch=v8 -xspace -xildoff -I/opt/csw/bdb44/include -I/opt/csw/include'
    ccversion='Sun C 5.8 Patch 121015-04 2007/01/10', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-L/opt/csw/bdb44/lib -L/opt/csw/lib -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib/v8plus -L/opt/SUNWspro/prod/lib -L/lib'
    libpth=/usr/lib /usr/ccs/lib /opt/SUNWspro/prod/lib/v8plus /opt/SUNWspro/prod/lib /lib /opt/csw/lib
    libs=-lsocket -lnsl -lgdbm -ldb-4.4 -ldl -lm -lpthread -lc
    perllibs=-lsocket -lnsl -ldb-4.4 -ldl -lm -lpthread -lc
    libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so.5.8.8
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R /opt/csw/lib'
    cccdlflags='-KPIC', lddlflags='-G -L/opt/csw/bdb44/lib -L/opt/csw/lib -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib/v8plus -L/opt/SUNWspro/prod/lib -L/lib'

Locally applied patches:
    

---
@INC for perl v5.8.8:
    /opt/csw/lib/perl/5.8.8
    /opt/csw/share/perl/5.8.8
    /opt/csw/lib/perl/site_perl
    /opt/csw/share/perl/site_perl
    /opt/csw/share/perl/site_perl
    /opt/csw/lib/perl/csw
    /opt/csw/share/perl/csw
    /opt/csw/share/perl/csw
    .

---
Environment for perl v5.8.8:
    HOME=/homes/jflack
    LANG=en_US.ISO8859-1
    LANGUAGE (unset)
    LC_COLLATE=en_US.ISO8859-1
    LC_CTYPE=en_US.ISO8859-1
    LC_MESSAGES=C
    LC_MONETARY=en_US.ISO8859-1
    LC_NUMERIC=en_US.ISO8859-1
    LC_TIME=en_US.ISO8859-1
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/opt/csw/bin:/local/bin:/local/sbin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:/sbin:/usr/sbin:/usr/openwin/bin:/usr/dt/bin:/pkgs/texlive/2005/bin/sparc-solaris:/usr/sfw/bin:/usr/local/bin:/opt/csw/bin:/opt/csw/sbin:/opt/csw/kde-gcc/bin
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh


[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]