Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #23366] open FILEHANDLE,MODE,LIST is broken

0 views
Skip to first unread message

Balazs Rauznitz

unread,
Aug 18, 2003, 6:31:27 PM8/18/03
to bugs-bi...@netlabs.develooper.com
# New Ticket Created by Balazs Rauznitz
# Please include the string: [perl #23366]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=23366 >

Looking at 'perldoc -f open' this should work:

perl -e 'open F, "-|", "ls", "-l"'

It does so on 5.8.0, but not on 5.6.0; it craps out saying:

Can't use an undefined value as filehandle reference at -e line 1.

Only reporting this because I've heard that people are working on 5.6.2.

Thanks,

Balazs


This is a bug report for perl from bal...@commissioner.com,
generated with the help of perlbug 1.28 running under perl v5.6.0.


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

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl v5.6.0:

Configured by bhcompile at Thu Aug 9 22:47:55 EDT 2001.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=linux, osvers=2.4.6-3.1enterprise, archname=i386-linux
uname='linux stripples.devel.redhat.com 2.4.6-3.1enterprise #1 smp tue jul 24 14:03:17 edt 2001 i686 unknown '
config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dcc=gcc -Dcccdlflags=-fPIC -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dd_dosuid -Dd_semctl_semun -Di_db -Di_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Uuselargefiles'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=undef
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='gcc', optimize='-O2 -march=i386 -mcpu=i686', gccversion=2.96 20000731 (Red Hat Linux 7.1 2.96-96)
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccflags ='-fno-strict-aliasing -I/usr/local/include'
stdchar='char', d_stdstdio=define, usevfork=false
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=4
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lc -lcrypt
libc=/lib/libc-2.2.4.so, 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.6.0:
/net/balazs/fsrc/media/appslib
/net/balazs/fsrc/core/lib
/net/balazs/fsrc/football/lib
/net/balazs/fsrc/football/appslib
/net/balazs/fsrc/media/appslib
/net/balazs/fsrc/core/lib
/net/balazs/fsrc/media/appslib
/net/balazs/fsrc/core/lib
/net/balazs/fsrc/football/lib
/net/balazs/fsrc/media/appslib
/net/balazs/fsrc/core/lib
/net/balazs/fsrc/football/lib
/net/balazs/fsrc/football/appslib
/net/balazs/fsrc/media/appslib
/net/balazs/fsrc/core/lib
/net/balazs/fsrc/media/appslib
/net/balazs/fsrc/core/lib
/net/balazs/fsrc/football/lib
/net/balazs/fsrc/media/appslib
/net/balazs/fsrc/core/lib
/net/balazs/fsrc/football/lib
/usr/lib/perl5/5.6.0/i386-linux
/usr/lib/perl5/5.6.0
/usr/lib/perl5/site_perl/5.6.0/i386-linux
/usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl
.

---
Environment for perl v5.6.0:
HOME=/net/balazs
LANG=en_US
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/net/balazs/fsrc/core/bin:/net/balazs/fsrc/media/bin:/net/balazs/fsrc/football/bin:/net/sysadm/bin:/net/sysadm:/net/balazs/fsrc/core/bin:/net/balazs/fsrc/media/bin:/net/balazs/fsrc/football/bin:/net/sysadm/bin:/net/sysadm:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/bin:/usr/X11R6/bin:.:/net/balazs/bin:/net/sysadm/bin:/usr/local/pkg/bin:/net/balazs/bin:/net/balazs/src/football/bin:/net/balazs/bin:.:/net/balazs/bin:/net/sysadm/bin:/usr/local/pkg/bin:/net/balazs/bin:/net/balazs/src/football/bin:/net/balazs/bin:.:/net/balazs/bin:/net/sysadm/bin:/usr/local/pkg/bin
PERL5LIB=/net/balazs/fsrc/media/appslib:/net/balazs/fsrc/core/lib:/net/balazs/fsrc/football/lib:/net/balazs/fsrc/football/appslib:/net/balazs/fsrc/media/appslib:/net/balazs/fsrc/core/lib:/net/balazs/fsrc/media/appslib:/net/balazs/fsrc/core/lib:/net/balazs/fsrc/football/lib:/net/balazs/fsrc/media/appslib:/net/balazs/fsrc/core/lib:/net/balazs/fsrc/football/lib:/net/balazs/fsrc/football/appslib:/net/balazs/fsrc/media/appslib:/net/balazs/fsrc/core/lib:/net/balazs/fsrc/media/appslib:/net/balazs/fsrc/core/lib:/net/balazs/fsrc/football/lib:/net/balazs/fsrc/media/appslib:/net/balazs/fsrc/core/lib:/net/balazs/fsrc/football/lib:
PERL_BADLANG (unset)
SHELL=/bin/bash

Arthur Bergman

unread,
Aug 19, 2003, 10:35:50 AM8/19/03
to perl5-...@perl.org, bugs-bi...@netlabs.develooper.com

On Monday, August 18, 2003, at 11:31 pm, Balazs Rauznitz (via RT)
wrote:

>
>
> Looking at 'perldoc -f open' this should work:
>
> perl -e 'open F, "-|", "ls", "-l"'
>
> It does so on 5.8.0, but not on 5.6.0; it craps out saying:
>
> Can't use an undefined value as filehandle reference at -e line 1.
>
> Only reporting this because I've heard that people are working on
> 5.6.2.
>
> Thanks,
>
>

I doubt this is going to be fixed in 5.6.2, it is a 5.8.0 feature?

Arthur

Michael G Schwern

unread,
Aug 19, 2003, 10:51:35 PM8/19/03
to Arthur Bergman, perl5-...@perl.org, bugs-bi...@netlabs.develooper.com
On Tue, Aug 19, 2003 at 03:35:50PM +0100, Arthur Bergman wrote:
> >Looking at 'perldoc -f open' this should work:
> >
> >perl -e 'open F, "-|", "ls", "-l"'
> >
> >It does so on 5.8.0, but not on 5.6.0; it craps out saying:
> >
> >Can't use an undefined value as filehandle reference at -e line 1.
> >
> >Only reporting this because I've heard that people are working on
> >5.6.2.
> >
> >Thanks,
>
> I doubt this is going to be fixed in 5.6.2, it is a 5.8.0 feature?

Its a 5.6.0 feature.

open FILEHANDLE,MODE,LIST

it appears that only works in 5.6.0 if LIST has one element. ie.

open F, "-|", "ls -l"

The new "three arg open". It might be a bug or it might be ambiguous
documentation. Anyhow, its not going to get fixed in 5.6.2. 5.6.2 is
just fixes so it can work with recent compilers. 5.6.3 will address bugs...
whenever it comes out.


--
Michael G Schwern sch...@pobox.com http://www.pobox.com/~schwern/
We don't know. But if we did, we wouldn't tell you.

Nick Ing-Simmons

unread,
Aug 20, 2003, 3:53:02 AM8/20/03
to s...@nanisky.com, bugs-bi...@netlabs.develooper.com, perl5-...@perl.org

But only a open-parsing one, not one that _needs_ PerlIO
so it could be back-fitted to 5.6 if someone had that much enthusiasm.

>
>Arthur

0 new messages