develooper Front page | perl.perl5.porters | Postings from July 2012

[perl #114020] given should localize topic, not lexicalize topic

Thread Previous | Thread Next
From:
Ricardo SIGNES
Date:
July 6, 2012 16:07
Subject:
[perl #114020] given should localize topic, not lexicalize topic
Message ID:
rt-3.6.HEAD-28836-1341616050-1331.114020-75-0@perl.org
# New Ticket Created by  Ricardo SIGNES 
# Please include the string:  [perl #114020]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=114020 >



This is a bug report for perl from rjbs@cpan.org,
generated with the help of perlbug 1.39 running under perl 5.16.0.


-----------------------------------------------------------------
[Please describe your issue here]

    perl -E 'given (10) { say $::_; say $_ }'

Prints "\n10\n"

It should print "10\n10\n"

Lexical topicalization by given is the cause of nearly endless grief and
very little, if any, benefit.


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

Configured by rjbs at Tue May 22 08:24:33 EDT 2012.

Summary of my perl5 (revision 5 version 16 subversion 0) configuration:
   
  Platform:
    osname=linux, osvers=2.6.39-linode33, archname=i686-linux
    uname='linux cancer 2.6.39-linode33 #5 smp sun may 29 02:01:17 utc 2011 i686 gnulinux '
    config_args='-de -Dprefix=/home/rjbs/perl5/perlbrew/perls/16.0'
    hint=recommended, useposix=true, d_sigaction=define
    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 -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.6.3', 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 =' -fstack-protector -L/usr/local/lib -L/opt/local/lib'
    libpth=/usr/local/lib /opt/local/lib /lib/i386-linux-gnu /lib/../lib /usr/lib/i386-linux-gnu /usr/lib/../lib /lib /usr/lib
    libs=-lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.13'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -L/opt/local/lib -fstack-protector'

Locally applied patches:
    

---
@INC for perl 5.16.0:
    /home/rjbs/.perlbrew/libs/16.0@std/lib/perl5/i686-linux
    /home/rjbs/.perlbrew/libs/16.0@std/lib/perl5/i686-linux
    /home/rjbs/.perlbrew/libs/16.0@std/lib/perl5
    /home/rjbs/perl5/perlbrew/perls/16.0/lib/site_perl/5.16.0/i686-linux
    /home/rjbs/perl5/perlbrew/perls/16.0/lib/site_perl/5.16.0
    /home/rjbs/perl5/perlbrew/perls/16.0/lib/5.16.0/i686-linux
    /home/rjbs/perl5/perlbrew/perls/16.0/lib/5.16.0
    .

---
Environment for perl 5.16.0:
    HOME=/home/rjbs
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/rjbs/.perlbrew/libs/16.0@std/bin:/home/rjbs/perl5/perlbrew/bin:/home/rjbs/perl5/perlbrew/perls/16.0/bin:/home/rjbs/bin:/usr/local/bin:/home/rjbs/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/opt/local/bin:/opt/local/bin
    PERL5LIB=/home/rjbs/.perlbrew/libs/16.0@std/lib/perl5/i686-linux:/home/rjbs/.perlbrew/libs/16.0@std/lib/perl5
    PERLBREW_BASHRC_VERSION=0.43
    PERLBREW_HOME=/home/rjbs/.perlbrew
    PERLBREW_LIB=std
    PERLBREW_MANPATH=/home/rjbs/.perlbrew/libs/16.0@std/man:/home/rjbs/perl5/perlbrew/perls/16.0/man
    PERLBREW_PATH=/home/rjbs/.perlbrew/libs/16.0@std/bin:/home/rjbs/perl5/perlbrew/bin:/home/rjbs/perl5/perlbrew/perls/16.0/bin
    PERLBREW_PERL=16.0
    PERLBREW_ROOT=/home/rjbs/perl5/perlbrew
    PERLBREW_VERSION=0.43
    PERL_AUTOINSTALL=--skipdeps
    PERL_BADLANG (unset)
    PERL_LOCAL_LIB_ROOT=/home/rjbs/.perlbrew/libs/16.0@std
    PERL_MB_OPT=--install_base /home/rjbs/.perlbrew/libs/16.0@std
    PERL_MM_OPT=INSTALL_BASE=/home/rjbs/.perlbrew/libs/16.0@std
    SHELL=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