Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open on localized *F pb #5828

Closed
p5pRT opened this issue Aug 10, 2002 · 8 comments
Closed

open on localized *F pb #5828

p5pRT opened this issue Aug 10, 2002 · 8 comments

Comments

@p5pRT
Copy link

@p5pRT p5pRT commented Aug 10, 2002

Migrated from rt.perl.org#16113 (status was 'resolved')

Searchable as RT16113$

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Aug 10, 2002

From pixel@mandrakesoft.com

Created by pixel@localhost.localdomain

my $fh = do { local *F; open(F, '/etc/passwd'); *F };
print <$fh>;

doesn't work in 5.8.0, whereas it works in 5.6.1, and the following
works too​:

my $fh = do { local *F; open(*F, '/etc/passwd'); *F };
print <$fh>;

Perl Info

Flags:
    category=core
    severity=medium

Site configuration information for perl v5.8.0:

Configured by pixel at Fri Aug  2 11:57:47 CEST 2002.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.4.18-22mdksmp, archname=i386-linux-thread-multi
    uname='linux no.mandrakesoft.com 2.4.18-22mdksmp #1 smp thu aug 1 19:53:35 cest 2002 i686 unknown '
    config_args='-des -Darchname=i386-linux -Dcc=gcc -Doptimize=-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math -fno-strength-reduce -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dman3ext=3pm -Dcf_by=MandrakeSoft -Dmyhostname=localhost -Dperladmin=root@localhost -Dd_dosuid -Ud_csh -Duseshrplib -Dusethreads'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math -fno-strength-reduce',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdbm'
    ccversion='', gccversion='3.2 (Mandrake Linux 9.0 3.2-0.2mdk)', 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='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldl -lm -lpthread -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
    libc=/lib/libc-2.2.5.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.2.5'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.8.0:
    /home/pixel/etc/perl
    /home/pixel/etc/perl/i386-linux
    /home/pixel/etc/perl/site_perl
    /usr/lib/perl5/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.0
    /usr/lib/perl5/vendor_perl
    .


Environment for perl v5.8.0:
    HOME=/home/pixel
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/home/pixel/lib/i386
    LOGDIR (unset)
    PATH=/home/pixel/bin:/home/pixel/bin/oneliner:/home/pixel/bin/perl:/home/pixel/bin/ruby:/home/pixel/bin/python:/home/pixel/bin/tcl:/home/pixel/bin/i386:/usr/freeware/bin:/usr/etc:/usr/local/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/bin:/usr/bin:/usr/local/bin:/root/bin:/root/bin:/usr/X11R6/bin
    PERL5LIB=/home/pixel/etc/perl:/home/pixel/etc/perl/i386-linux:/home/pixel/etc/perl/site_perl
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Aug 10, 2002

From @rgs

Pixel (via RT) wrote​:

my $fh = do { local *F; open(F, '/etc/passwd'); *F };
print <$fh>;

doesn't work in 5.8.0, whereas it works in 5.6.1, and the following
works too​:

my $fh = do { local *F; open(*F, '/etc/passwd'); *F };
print <$fh>;

Apparently this only occurs with ithreads.

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Aug 11, 2002

From nick@ing-simmons.net

Pixel <perl5-porters@​perl.org> writes​:

# New Ticket Created by Pixel
# Please include the string​: [perl #16113]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt2/Ticket/Display.html?id=16113 >

This is a bug report for perl from pixel@​localhost.localdomain,
generated with the help of perlbug 1.34 running under perl v5.8.0.

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

my $fh = do { local *F; open(F, '/etc/passwd'); *F };
print <$fh>;

doesn't work in 5.8.0, whereas it works in 5.6.1, and the following
works too​:

my $fh = do { local *F; open(*F, '/etc/passwd'); *F };
print <$fh>;

And

open(my $fh,'/etc/passwd');
print <$fh>;

should work both places as well.

The accepted thing to do was to return a reference to the glob.

IIRC we "fixed" a feature that localized globs were not being de-localized
"right". Returning a reference to the local glob should still work.
But the open(my $fh,...) is prefered for 5.6.1+

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

Configured by pixel at Fri Aug 2 11​:57​:47 CEST 2002.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration​:
Platform​:
osname=linux, osvers=2.4.18-22mdksmp, archname=i386-linux-thread-multi
uname='linux no.mandrakesoft.com 2.4.18-22mdksmp #1 smp thu aug 1 19​:53​:35 cest 2002 i686 unknown '
config_args='-des -Darchname=i386-linux -Dcc=gcc -Doptimize=-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math -fno-strength-reduce -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dman3ext=3pm -Dcf_by=MandrakeSoft -Dmyhostname=localhost -Dperladmin=root@​localhost -Dd_dosuid -Ud_csh -Duseshrplib -Dusethreads'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler​:
cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math -fno-strength-reduce',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdbm'
ccversion='', gccversion='3.2 (Mandrake Linux 9.0 3.2-0.2mdk)', 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='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldl -lm -lpthread -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
libc=/lib/libc-2.2.5.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.2.5'
Dynamic Linking​:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches​:

---
@​INC for perl v5.8.0​:
/home/pixel/etc/perl
/home/pixel/etc/perl/i386-linux
/home/pixel/etc/perl/site_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl
.

---
Environment for perl v5.8.0​:
HOME=/home/pixel
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH=/home/pixel/lib/i386
LOGDIR (unset)
PATH=/home/pixel/bin​:/home/pixel/bin/oneliner​:/home/pixel/bin/perl​:/home/pixel/bin/ruby​:/home/pixel/bin/python​:/home/pixel/bin/tcl​:/home/pixel/bin/i386​:/usr/freeware/bin​:/usr/etc​:/usr/local/bin​:/usr/X11R6/bin​:/sbin​:/usr/sbin​:/usr/X11R6/bin​:/bin​:/usr/bin​:/usr/local/bin​:/root/bin​:/root/bin​:/usr/X11R6/bin
PERL5LIB=/home/pixel/etc/perl​:/home/pixel/etc/perl/i386-linux​:/home/pixel/etc/perl/site_perl
PERL_BADLANG (unset)
SHELL=/bin/bash
--
Nick Ing-Simmons
http​://www.ni-s.u-net.com/

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jan 16, 2018

From zefram@fysh.org

This was fixed, apparently unintentionally, by commit
60779a3 in Perl 5.19.10. This ticket
can be closed.

-zefram

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jan 16, 2018

From @jkeenan

Confirmed; closing.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jan 16, 2018

@jkeenan - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Jan 16, 2018
@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jan 16, 2018

From @cpansprout

On Tue, 16 Jan 2018 05​:28​:02 -0800, jkeenan wrote​:

Confirmed; closing.

But what about adding a test?

--

Father Chrysostomos

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jan 16, 2018

From zefram@fysh.org

Test added in commit c7a9a25.

-zefram

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant