develooper Front page | perl.perl5.porters | Postings from November 2000

[ID 20001106.006] find2perl generated scripts issue new lstat()on filehandle _ warning

Thread Next
David Dyck
November 6, 2000 22:45
[ID 20001106.006] find2perl generated scripts issue new lstat()on filehandle _ warning
Message ID:
This is a bug report for perl from,
generated with the help of perlbug 1.32 running under perl v5.7.0.

[Please enter your report here]

I selected category core (even though find2perl is
probably a utility), since the warning is issued from lstat

This is causing my backup scripts generated initially using
find2perl, and greatly modified since, to issue thousands
of lines of warnings.   (does the warning need to be issued
more than once?)  Also, I read that lstat(_) will become 
a fatal error in the future -  do you really want to break
many backup scripts like this?  

Reproduce by:
$ cd perl-current
$ find2perl -name 'INS*' -tar /tmp/ins.tar > /tmp/doins
$ perl /tmp/doins
lstat() on filehandle _ at /tmp/doins line 67.

Here's some of the code that find2perl generated, and
it appears that it's trying to avoid doing a second 
lstat on the file, once inside wanted, and the second
time in sub tar.

     1	#! /usr/local/bin/perl -w
    36	sub wanted {
    37	    my ($dev,$ino,$mode,$nlink,$uid,$gid);
    39	    /^INS.*\z/s &&
    40	    (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
    41	    &tar(*FH_tmp_ins_tar, $name);
    42	}
    62	sub tar {
    63	    my ($fh, $fname) = @_;
    67	    my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
    68	        $atime,$mtime,$ctime,$blksize,$blocks) = lstat(_);

[Please do not change anything below this line]
Site configuration information for perl v5.7.0:

Configured by dcd at Mon Nov  6 15:10:14 PST 2000.

Summary of my perl5 (revision 5.0 version 7 subversion 0) configuration:
    osname=linux, osvers=2.4.0-test10, archname=i686-linux
    uname='linux dd 2.4.0-test10 #1 tue oct 31 13:48:39 pst 2000 i686 '
    config_args='-Dusedevel -Doptimize=-O3 -g -de'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    cc='cc', ccflags ='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O3 -g',
    cppflags='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='egcs- 19990314/Linux (egcs-1.1.2 release)', 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=4
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lgdbm -ldbm -ldb -ldl -lm -lc
    perllibs=-ldl -lm -lc
    libc=/lib/, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:

@INC for perl v5.7.0:

Environment for perl v5.7.0:
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About