Front page | perl.perl5.porters |
Postings from April 2000
[ID 20000421.003] perlfunc says you can lstat a file handle butyou cannot
From:
Todd C. Miller
Date:
April 21, 2000 09:43
Subject:
[ID 20000421.003] perlfunc says you can lstat a file handle butyou cannot
Message ID:
200004211643.e3LGhkX24720@xerxes.courtesan.com
This is a bug report for perl from Todd.Miller@courtesan.com,
generated with the help of perlbug 1.28 running under perl v5.6.0.
-----------------------------------------------------------------
[Please enter your report here]
The perlfunc pod/man page states that you can lstat() a file handle
but if you do so and then say:
if ( -l _ )
perl complains that you didn't do an lstat(). This could be very
confusing to the neophyte since the code clearly *did* do an
lstat, it's just that lstat on a file handle is rather meaningless
and perl is nice enough to treat it just as a stat (since it will
do an fstat(2) on it anyway).
At the very least the documentation should be changed. Personally,
I think perl should warn when someone tries to do lstat(FH).
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=docs
severity=low
---
Site configuration information for perl v5.6.0:
Configured by root at Fri Apr 21 00:53:47 MDT 2000.
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=openbsd, osvers=2.7, archname=i386-openbsd
uname='openbsd'
config_args='-Dopenbsd_distribution=defined -dsE'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='cc', optimize='-O2', gccversion=2.95.2 19991024 (release)
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccflags ='-fno-strict-aliasing -I/usr/local/include'
stdchar='char', d_stdstdio=undef, usevfork=true
intsize=4, longsize=4, ptrsize=4, doublesize=8
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, usemymalloc=n, prototype=define
Linker and Libraries:
ld='ld', ldflags =''
libpth=/usr/lib
libs=-lm -lc
libc=/usr/lib/libc.a, so=so, useshrplib=true, libperl=libperl.so.6.0
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=define, ccdlflags=' '
cccdlflags='-DPIC -fPIC ', lddlflags='-Bshareable '
Locally applied patches:
---
@INC for perl v5.6.0:
/usr/libdata/perl5/i386-openbsd/5.6.0
/usr/local/libdata/perl5/i386-openbsd/5.6.0
/usr/libdata/perl5
/usr/local/libdata/perl5
/usr/local/libdata/perl5/site_perl/i386-openbsd
/usr/libdata/perl5/site_perl/i386-openbsd
/usr/local/libdata/perl5/site_perl
/usr/libdata/perl5/site_perl
/usr/lib/perl5/site_perl
.
---
Environment for perl v5.6.0:
HOME=/home/millert
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/millert/bin/OpenBSD.i386:/home/millert/bin:/home/millert/bin/scripts:/usr/local/gnu/bin:/usr/local/bin:/usr/local/sbin:/usr/local/etc:/usr/local/rcs/bin:/usr/local/mh/bin:/usr/local/news/bin:/usr/local/emacs/bin:/usr/local/netpbm/bin:/usr/local/mtools/bin:/usr/local/netscape/bin:/usr/local/ghostscript/bin:/usr/local/frame/bin:/usr/local/teTeX/bin:/usr/local/cvs-1.10.1/bin:/usr/local/games/bin:/usr/local/archivers/bin:/usr/local/skey/bin:/usr/local/cdrecord/bin:/usr/local/audio/bin:/bin:/sbin:/usr/games:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/X11/bin:/usr/X11R6/bin:/usr/local/bin:/usr/obj/bin:/usr/src/bin
PERL_BADLANG (unset)
SHELL=/usr/local/bin/tcsh