[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
[perl #59368] regexp flag m ignored if applied on top of qr, bug or feature of 5.10?
# New Ticket Created by Mark Martinec
# Please include the string: [perl #59368]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=59368 >
This is a bug report for perl from Mark.Martinec@ijs.si,
generated with the help of perlbug 1.36 running under perl 5.10.0.
-----------------------------------------------------------------
Seems like a regexp modifier /m is ignored if applied late
to a regexp expression involving a qr compiled regexp.
Perl 5.10.0 behaves differently than 5.8.8 in this regard:
$ perl5.6.2 -le \
'$r=qr/(.)$/; @a = "abC\ndeF\n"=~/$r/mg; print join ",",@a'
C,F
$ perl5.8.8 -le \
'$r=qr/(.)$/; @a = "abC\ndeF\n"=~/$r/mg; print join ",",@a'
C,F
$ perl5.10.0 -le \
'$r=qr/(.)$/; @a = "abC\ndeF\n"=~/$r/mg; print join ",",@a'
F
If the qr expression has a /m modifier itself,
then the result is again as expected:
$ perl5.10.0 -le \
'$r=qr/(.)$/m; @a = "abC\ndeF\n"=~/$r/mg; print join ",",@a'
C,F
Is this a bug in 5.10, or a fix of something that was
broken up until now?
Mark
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl 5.10.0:
Configured by mark at Fri Sep 26 14:12:03 UTC 2008.
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=freebsd, osvers=7.0-release-p1, archname=amd64-freebsd
uname='freebsd neli-virtual.ijs.si 7.0-release-p1 freebsd 7.0-release-p1 #0: sun jun 1 03:02:30 cest 2008
lesi@neli.ijs.si:usrobjusrsrcsysneli amd64 '
config_args='-ds -e'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags
='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include',
optimize='-O',
cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='4.2.1 20070719 [FreeBSD]', 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 ='-Wl,-E -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lm -lcrypt -lutil -lc
perllibs=-lm -lcrypt -lutil -lc
libc=, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib'
Locally applied patches:
---
@INC for perl 5.10.0:
/usr/local/lib/perl5/5.10.0/amd64-freebsd
/usr/local/lib/perl5/5.10.0
/usr/local/lib/perl5/site_perl/5.10.0/amd64-freebsd
/usr/local/lib/perl5/site_perl/5.10.0
/usr/local/lib/perl5/site_perl/5.6.2.OFF
/usr/local/lib/perl5/site_perl
.
---
Environment for perl 5.10.0:
HOME=/root
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/usr/local/zenoss/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
PERL_BADLANG (unset)
SHELL=/usr/local/bin/bash
- Follow-Ups from:
-
"Rafael Garcia-Suarez" <rgarciasuarez@gmail.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]