develooper Front page | perl.perl5.porters | Postings from June 2004

[perl #30504] B::Deparse scoping problem with for loop

From:
Torsten Hofmann
Date:
June 28, 2004 04:18
Subject:
[perl #30504] B::Deparse scoping problem with for loop
Message ID:
rt-3.0.11-30504-91514.16.8566653002298@perl.org
# New Ticket Created by  Torsten Hofmann 
# Please include the string:  [perl #30504]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=30504 >



This is a bug report for perl from T.E.Hofmann@gmx.de,
generated with the help of perlbug 1.34 running under perl v5.8.0.


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

~ 111 > perl             -le '$_="default" for my ($foo, $bar, $baz); print $foo'
default
~ 112 > perl -MO=Deparse -le '$_="default" for my ($foo, $bar, $baz); print $foo' | perl
-e syntax OK

~ 113 > perl -MO=Deparse -le '$_="default" for my ($foo, $bar, $baz); print $foo'
BEGIN { $/ = "\n"; $\ = "\n"; }
foreach $_ (my($foo, $bar, $baz)) {
    $_ = 'default';
}
print $foo;
-e syntax OK

so B::Deparse gets the scoping wrong. This is similar (the same?) to ticket #22073.

Also see discussion at Perl Monks

http://www.perlmonks.com/index.pl?node_id=369512

where this originally came up in a conversation between tilly and runrig.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=library
    severity=low
---
This perlbug was built using Perl v5.8.0 - Tue Oct  8 16:54:37 UTC 2002
It is being executed now by  Perl v5.8.0 - Tue Oct  8 16:45:50 UTC 2002.

Site configuration information for perl v5.8.0:

Configured by root at Tue Oct  8 16:45:50 UTC 2002.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.4.19, archname=i586-linux-thread-multi
    uname='linux amdsim5 2.4.19 #1 wed mar 27 13:57:05 utc 2002 i686 unknown '
    config_args='-ds -e -Dprefix=/usr -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Duseshrplib=true'
    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='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O3 --pipe',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing'
    ccversion='', gccversion='3.2', 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 =''
    libpth=/lib /usr/lib /usr/local/lib
    libs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
    libc=, 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/i586-linux-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared'

Locally applied patches:
    

---
@INC for perl v5.8.0:
    /usr/lib/perl5/5.8.0/i586-linux-thread-multi
    /usr/lib/perl5/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.0
    /usr/lib/perl5/site_perl
    .

---
Environment for perl v5.8.0:
    HOME=/home/tohofman
    LANG=de_DE@euro
    LANGUAGE (unset)
    LC_COLLATE=POSIX
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/tohofman/bin:/opt/kde3/bin:/opt/gnome/bin:/usr/games:/home/tohofman/bin:/usr/bin/X11:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/lib/java/jre/bin:.:.:/usr/lib/java/jre/bin:/opt/gnome/bin
    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