Front page | perl.perl5.porters |
Postings from May 2003
[perl #22231] <$foo> is parsed as glob(' ' . $foo) if Switch.pm is used
From:
Michael Fowler
Date:
May 17, 2003 17:58
Subject:
[perl #22231] <$foo> is parsed as glob(' ' . $foo) if Switch.pm is used
Message ID:
rt-22231-57784.9.27978655304244@bugs6.perl.org
# New Ticket Created by Michael Fowler
# Please include the string: [perl #22231]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=22231 >
This is a bug report for perl from michael@shoebox.net,
generated with the help of perlbug 1.34 running under perl v5.8.0.
-----------------------------------------------------------------
[Please enter your report here]
The following code:
#!/usr/bin/perl
use Switch;
#switch
open(my $foo, "<&STDIN") || die;
print <$foo> . "\n";
prints:
GLOB(0x811f354)
If the use Switch line is commented out it prints whatever is passed on
STDIN, as expected. Using B::Deparse confirms the last line is being parsed
as:
print glob(' ', $foo) . "\n";
with the use Switch uncommented. The commented out switch statement is
required; Switch apparently must find "switch" in the code somewhere for the
problem to be triggered.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl v5.8.0:
Configured by michael at Tue Dec 17 01:34:48 AKST 2002.
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
Platform:
osname=linux, osvers=2.2.19, archname=i586-linux
uname='linux beowulf 2.2.19 #1 wed aug 22 19:47:49 akdt 2001 i586 unknown '
config_args=''
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/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O3',
cppflags='-fno-strict-aliasing -I/usr/local/include -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccversion='', gccversion='2.95.4 20011002 (Debian prerelease)', 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/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldbm -ldb -ldl -lm -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
libc=/lib/libc-2.2.5.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.2.5'
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.8.0:
/home/michael/perl5lib
/home/michael/code/libs/perl
/home/michael/perl/5.8.0/normal/lib/i586-linux
/home/michael/perl/5.8.0/normal/lib
/home/michael/perl/5.8.0/normal/site_perl/i586-linux
/home/michael/perl/5.8.0/normal/site_perl
/home/michael/perl/5.8.0/normal/site_perl
.
---
Environment for perl v5.8.0:
HOME=/home/michael
LANG=C
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/michael/bin:/var/mp3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/sbin:/usr/sbin:/usr/bin/X11:/usr/lib/postgresql/bin:/usr/local/games:/usr/games:.
PERL5LIB=/home/michael/perl5lib:/home/michael/code/libs/perl
PERL_BADLANG (unset)
SHELL=/bin/bash
-
[perl #22231] <$foo> is parsed as glob(' ' . $foo) if Switch.pm is used
by Michael Fowler