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

[perl #21321] local ${"FOO"} does not work

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
February 20, 2003 14:09
Subject:
[perl #21321] local ${"FOO"} does not work
Message ID:
rt-21321-52535.8.62663310467681@bugs6.perl.org
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #21321]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=21321 >


This is a bug report for perl from jhi@lyta.hut.fi,
generated with the help of perlbug 1.34 running under perl v5.8.0.


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

Bleadperl or 5.8.0:

$ ./perl -e 'local ${"FOO"}=1'
Can't localize through a reference at -e line 1.
$ 

What reference where?

perldiag says:

=item Can't localize through a reference

(F) You said something like C<local $$ref>, which Perl can't currently
handle, because when it goes to restore the old value of whatever $ref
pointed to after the scope of the local() is finished, it can't be sure
that $ref will still be a reference.

But I still fail to see a reference in there.  To be honest, I had
originally something more that "FOO" in between the {}, I had "\cFOO".
But still completely compiletime, nothing naughty like "FOO$BAR".

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

Configured by jhi at Wed Aug  7 21:21:34 EET DST 2002.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=dec_osf, osvers=4.0d, archname=alpha-dec_osf-thread-multi
    uname='osf1 lyta.hut.fi v4.0 878 alpha '
    config_args='-des -Duseithreads -Doptimize=-g -Dprefix=/u/vieraat/vieraat/jhi/Perl/platform/OSF1'
    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=define use64bitall=define uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-pthread -std -fprm d -ieee -DDEBUGGING -DLANGUAGE_C',
    optimize='-g',
    cppflags='-pthread -std -ieee -DDEBUGGING -DLANGUAGE_C'
    ccversion='V5.6-082', gccversion='', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =''
    libpth=/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /var/shlib
    libs=-ldbm -ldb -lm -lutil -lpthread -lexc
    perllibs=-lm -lutil -lpthread -lexc
    libc=/usr/shlib/libc.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -Wl,-rpath,/u/vieraat/vieraat/jhi/Perl/platform/OSF1/lib/perl5/5.8.0/alpha-dec_osf-thread-multi/CORE'
    cccdlflags=' ', lddlflags='-shared -expect_unresolved "*" -msym -std'

Locally applied patches:
    

---
@INC for perl v5.8.0:
    /u/vieraat/vieraat/jhi/Perl/platform/OSF1/lib/perl5/5.8.0/alpha-dec_osf-thread-multi
    /u/vieraat/vieraat/jhi/Perl/platform/OSF1/lib/perl5/5.8.0
    /u/vieraat/vieraat/jhi/Perl/platform/OSF1/lib/perl5/site_perl/5.8.0/alpha-dec_osf-thread-multi
    /u/vieraat/vieraat/jhi/Perl/platform/OSF1/lib/perl5/site_perl/5.8.0
    /u/vieraat/vieraat/jhi/Perl/platform/OSF1/lib/perl5/site_perl
    .

---
Environment for perl v5.8.0:
    HOME=/u/vieraat/vieraat/jhi
    LANG=C
    LANGUAGE (unset)
    LC_ALL=fi_FI.ISO8859-1
    LC_CTYPE=fi_FI.ISO8859-1
    LD_LIBRARY_PATH=/tmp/jhi/perl
    LOGDIR (unset)
    PATH=/u/vieraat/vieraat/jhi/Perl/bin:/u/vieraat/vieraat/jhi/.s:/u/vieraat/vieraat/jhi/.b/OSF1:/c/bin:/p/bin:/p/adm/bin:/usr/bin:/usr/sbin:/sbin:/bin:/usr/ccs/bin:/usr/lib:/etc:/lib:/p/X6/bin:/p/X5/bin:/usr/bin/X11:/usr/lbin:/usr/sbin/acct:/usr/tcb/bin:/tcb/bin:/usr/field:/u/vieraat/vieraat/jhi
    PERL_BADLANG (unset)
    SHELL=/bin/zsh


Thread Previous | Thread Next


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