Front page | perl.perl5.porters |
Postings from November 1999
[ID 19991128.001] The value of pattern match vars. after `next'
Thread Next
From:
Inaba Hiroto
Date:
November 28, 1999 03:57
Subject:
[ID 19991128.001] The value of pattern match vars. after `next'
Message ID:
38411817.F102A334@st.rim.or.jp
This is a bug report for perl from inaba@st.rim.or.jp,
generated with the help of perlbug 1.26 running under perl 5.00503.
-----------------------------------------------------------------
[Please enter your report here]
After `next' or `redo', pattern match variables are reset to the block's
initial value.
$_ = foo; /foo/;
for (qw/bar baz/) { print "$&\n" unless /bar/; } # print "bar\n"
for (qw/bar baz/) { next if /bar/; print "$&\n"; } # print "foo\n"
I think it is a bug and made a patch for 5.00503 (attached).
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Site configuration information for perl 5.00503:
Configured by inaba at Fri Mar 19 23:22:34 JST 1999.
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
Platform:
osname=linux, osvers=2.0.35, archname=i686-linux-thread
uname='linux elfin.cybermem.org 2.0.35 #1 tue oct 13 19:22:41 jst
1998 i686 unknown '
hint=recommended, useposix=true, d_sigaction=define
usethreads=define useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-g -O6', gccversion=egcs-2.91.57 19980901
(egcs-1.1 release)
cppflags='-D_REENTRANT -Dbool=char -DHAS_BOOL -DDEBUGGING
-I/usr/local/include'
ccflags ='-D_REENTRANT -Dbool=char -DHAS_BOOL -DDEBUGGING
-I/usr/local/include'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=y, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lpthread -lc -lposix -lcrypt
libc=, 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:
MAINT_TRIAL_6 - 5.005_03 maintenance trial 6
---
@INC for perl 5.00503:
/root/lib/perl
/usr/lib/perl5/5.00503/i686-linux-thread
/usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.00503/i686-linux-thread
/usr/lib/perl5/site_perl/5.00503
.
---
Environment for perl 5.00503:
HOME=/root
LANG=ja_JP.ujis
LANGUAGE (unset)
LC_CTYPE=C
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/root/scripts:/usr/local/etc:/usr/local/sbin:/usr/local/netpbm/bin:/usr/local/bin:/usr/local/scripts:/usr/X11R6/bin:/usr/X11R5/bin:/usr/sbin:/usr/bin:/usr/etc:/usr/games:/usr/local/bin:/usr/local/MH/bin:/usr/local/canna/bin:/bin:/sbin:/root/bin:/root/bin
PERLLIB=/root/lib/perl
PERL_BADLANG=0
PERL_BADLANG=0
SHELL=/bin/zsh
--
Inaba Hiroto <inaba@st.rim.or.jp>
Thread Next
-
[ID 19991128.001] The value of pattern match vars. after `next'
by Inaba Hiroto