Front page | perl.perl5.porters |
Postings from September 2001
[ID 20010903.005] (if|unless) ( local ... ) not undone
From:
Bryan C . Warnock
Date:
September 3, 2001 17:43
Subject:
[ID 20010903.005] (if|unless) ( local ... ) not undone
Message ID:
01090320394905.28316@wakko.idiocity.nut
This is a bug report for perl from bwarnock@capita.com,
generated with the help of perlbug 1.33 running under perl v5.6.1.
-----------------------------------------------------------------
Local variables declared in a conditional expression of a
conditional block are not restored at the end of scope.
$a = 10;
if (local $a = 1){
}
print $a; # Should be 10, not 1
Applies to local variables declared in 'if (expr)', 'unless(expr)',
and 'elsif (expr)'. Lexical variables are okay, as are local
variables in the conditional expression of a loop block.
Occurs in 5.005_03 through 5.7.2.
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl v5.6.1:
Configured by bryan at Sat Jun 9 11:24:22 EDT 2001.
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=linux, osvers=2.4.3-20mdk, archname=i686-linux-64all-ld
uname='linux wakko.idiocity.nut 2.4.3-20mdk #1 sun apr 15 23:03:10 cest
2001 i686 unknown '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=define
Compiler:
cc='gcc', ccflags ='-DDEBUGGING -fno-strict-aliasing -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-g',
cppflags='-DDEBUGGING -fno-strict-aliasing'
ccversion='', gccversion='2.96 20000731 (Linux-Mandrake 8.0
2.96-0.48mdk)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='long double', nvsize=12,
Off_t='off_t', lseeksize=8
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldb -ldl -lm -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
libc=/lib/libc-2.2.2.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Locally applied patches:
---
@INC for perl v5.6.1:
/usr/local/lib/perl5/5.6.1/i686-linux-64all-ld
/usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux-64all-ld
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl
.
---
Environment for perl v5.6.1:
HOME=/home/bryan
LANG=en
LANGUAGE=en_US:en
LC_COLLATE=en_US
LC_CTYPE=en_US
LC_MESSAGES=en_US
LC_MONETARY=en_US
LC_NUMERIC=en_US
LC_TIME=en_US
LD_LIBRARY_PATH=/usr/lib
LOGDIR (unset)
PATH=.:/home/bryan/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/sbin:/us
r/sbin PERL_BADLANG (unset)
SHELL=/bin/tcsh
-
[ID 20010903.005] (if|unless) ( local ... ) not undone
by Bryan C . Warnock