develooper Front page | perl.perl5.porters | Postings from July 2003

[perl #23077] -T $filehandle seems broken

From:
Ken Williams
Date:
July 21, 2003 20:16
Subject:
[perl #23077] -T $filehandle seems broken
Message ID:
rt-23077-61610.17.1848397606932@rt.perl.org
# New Ticket Created by  Ken Williams 
# Please include the string:  [perl #23077]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=23077 >


This is a bug report for perl from ken@mathforum.org,
generated with the help of perlbug 1.28 running under perl v5.6.1.


-----------------------------------------------------------------
[Please enter your report here]

I've run the following test with both 5.6.1 and 5.8.0 on Mac OS X, and
it looks like -T $filehandle is returning different results (and
incorrect ones at that) than -T $filename.

==================
% echo foo > file
% perl -le 'print 0 + -T "file"; open $fh, "file" or die $!; print 0 +  
-T $fh'
1
0
==================

(I added zero for "clarity".)

I haven't tested the current 5.8.1 release candidate.

  -Ken


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
     category=core
     severity=medium
---
This perlbug was built using Perl v5.6.0 - Sun Jul 14 04:00:44 PDT 2002
It is being executed now by  Perl v5.6.1 - Sun May 25 21:13:41 CDT 2003.

Site configuration information for perl v5.6.1:

Configured by ken at Sun May 25 21:13:41 CDT 2003.

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
   Platform:
     osname=darwin, osvers=6.6, archname=darwin
     uname='darwin junior.local. 6.6 darwin kernel version 6.6: thu may  
1 21:48:54 pdt 2003; root:xnuxnu-344.34.obj~1release_ppc power  
macintosh powerpc '
     config_args='-des -Dfirstmakefile=GNUmakefile  
-Dldflags=-flat_namespace -Dprefix=/sw -Dinstallprefix=/sw  
-Uinstallusrbinperl -Dman3ext=3perl'
     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
   Compiler:
     cc='cc', ccflags ='-pipe -fno-common -DHAS_TELLDIR_PROTOTYPE  
-fno-strict-aliasing',
     optimize='-O3',
     cppflags='-pipe -fno-common -DHAS_TELLDIR_PROTOTYPE  
-fno-strict-aliasing'
     ccversion='', gccversion='Apple cpp-precomp 6.14', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',  
lseeksize=8
     alignbytes=8, usemymalloc=n, prototype=define
   Linker and Libraries:
     ld='cc', ldflags ='-flat_namespace -L/usr/local/lib'
     libpth=/usr/local/lib /usr/lib
     libs=-lm -lc
     perllibs=-lm -lc
     libc=/System/Library/Frameworks/System.framework/System, so=dylib,  
useshrplib=true, libperl=libperl.dylib
   Dynamic Linking:
     dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
     cccdlflags=' ', lddlflags='-flat_namespace -bundle -undefined  
suppress -L/usr/local/lib'

Locally applied patches:


---
@INC for perl v5.6.1:
     /sw/lib/perl5/5.6.1/darwin
     /sw/lib/perl5/5.6.1
     /sw/lib/perl5/darwin
     /sw/lib/perl5
     /sw/lib/perl5/5.6.1/darwin
     /sw/lib/perl5/5.6.1
     /Library/Perl/darwin
     /Library/Perl
     /Library/Perl
     .

---
Environment for perl v5.6.1:
     DYLD_LIBRARY_PATH (unset)
     HOME=/Users/ken
     LANG (unset)
     LANGUAGE (unset)
     LC_ALL=C
     LD_LIBRARY_PATH (unset)
     LOGDIR (unset)
      
PATH=/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/ 
Users/ken/bin:.:/usr/X11R6/bin
     PERL5LIB=/sw/lib/perl5
     PERL_BADLANG (unset)
     SHELL=/bin/tcsh





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About