Front page | perl.perl5.porters |
Postings from November 2014
[perl #123322] "our" has the same scoping rules as "my" or "state"
Thread Previous
From:
Eric Brine
Date:
November 28, 2014 23:34
Subject:
[perl #123322] "our" has the same scoping rules as "my" or "state"
Message ID:
rt-4.0.18-19631-1417217652-266.123322-75-0@perl.org
# New Ticket Created by "Eric Brine"
# Please include the string: [perl #123322]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=123322 >
This is a bug report for perl from ikegami@adaelis.com,
generated with the help of perlbug 1.40 running under perl 5.20.1.
-----------------------------------------------------------------
[Please describe your issue here]
$ perldoc -f our | grep 'same scoping'
"our" has the same scoping rules as "my" or "state", meaning that
$ perl -Mstrict -E'say( ( our $y = "abc" ), $y )'
abcabc
$ perl -Mstrict -E'say( ( my $y = "abc" ), $y )'
Global symbol "$y" requires explicit package name at -e line 1.
Execution of -e aborted due to compilation errors.
Seems the docs aren't accurate.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl 5.20.1:
Configured by ikegami at Wed Oct 22 12:17:18 PDT 2014.
Summary of my perl5 (revision 5 version 20 subversion 1) configuration:
Platform:
osname=linux, osvers=3.2.61-grsec-modsign, archname=x86_64-linux-thread-multi
uname='linux bizet 3.2.61-grsec-modsign #1 smp tue aug 12 09:58:26 utc 2014 x86_64 x86_64 x86_64 gnulinux '
config_args='-de -Dprefix=/home/ikegami/usr/perlbrew/perls/5.20.1t -DPERL_SUB_DEPTH_WARN=1000 -Dusethreads -Aeval:scriptdir=/home/ikegami/usr/perlbrew/perls/5.20.1t/bin'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.6.3', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=libc-2.15.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.15'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'
---
@INC for perl 5.20.1:
/home/ikegami/usr/perlbrew/perls/5.20.1t/lib/site_perl/5.20.1/x86_64-linux-thread-multi
/home/ikegami/usr/perlbrew/perls/5.20.1t/lib/site_perl/5.20.1
/home/ikegami/usr/perlbrew/perls/5.20.1t/lib/5.20.1/x86_64-linux-thread-multi
/home/ikegami/usr/perlbrew/perls/5.20.1t/lib/5.20.1
.
---
Environment for perl 5.20.1:
HOME=/home/ikegami
LANG (unset)
LANGUAGE (unset)
LC_COLLATE=C
LD_LIBRARY_PATH=/home/ikegami/lib
LOGDIR (unset)
PATH=/home/ikegami/usr/perlbrew/bin:/home/ikegami/usr/perlbrew/perls/5.20.1t/bin:.:~/bin:~/usr/perlbrew/bin:~/usr/perlbrew/perls/current/bin:/home/ikegami/.gems/bin:/usr/lib/ruby/gems/1.8/bin/:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
PERLBREW_BASHRC_VERSION=0.71
PERLBREW_HOME=/home/ikegami/.perlbrew
PERLBREW_MANPATH=/home/ikegami/usr/perlbrew/perls/5.20.1t/man
PERLBREW_PATH=/home/ikegami/usr/perlbrew/bin:/home/ikegami/usr/perlbrew/perls/5.20.1t/bin
PERLBREW_PERL=5.20.1t
PERLBREW_ROOT=/home/ikegami/usr/perlbrew
PERLBREW_VERSION=0.71
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Previous