develooper Front page | perl.perl5.porters | Postings from February 2013

[perl #116823] Regexp::Grammars broken since 5.17.1

Thread Previous | Thread Next
From:
Andrew Rodland
Date:
February 18, 2013 17:58
Subject:
[perl #116823] Regexp::Grammars broken since 5.17.1
Message ID:
rt-3.6.HEAD-31961-1361167657-1956.116823-75-0@perl.org
# New Ticket Created by  Andrew Rodland 
# Please include the string:  [perl #116823]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=116823 >


This is a bug report for perl from andrew@cleverdomain.org,
generated with the help of perlbug 1.39 running under perl 5.17.9.


-----------------------------------------------------------------
Regexp::Grammars fails all of its tests beginning with perl 5.17.1 due to
the reworking of (?{...}) and (??{...}) in that version. The tests all fail
with "Eval-group not allowed at runtime, use re 'eval'" and real code using
Regexp::Grammars is expected to fail in the same way.

Regexp::Grammars works by using overload::constant qr to bless all qr's in
its scope into objects that have overloaded qq, which then does all kinds of
string replacements on the pattern to turn it into one brimming with
(??{...}) constructs. In previous versions of perl, this worked fine
(possibly because all of the overload mojo wasn't considered "runtime"), but
now it's broken.

I'm not sure if this is to be considered a bug in perl, or if the *previous*
behavior was a bug. If this is not a perl bug, how can Regexp::Grammars fix
itself without requiring its users to pepper their code with use re 'eval'?

Thanks,

Andrew

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

Configured by andrew at Sun Feb 17 02:44:05 EST 2013.

Summary of my perl5 (revision 5 version 17 subversion 9) configuration:
  Derived from: 480c67241f1595db244990ae2327660f1eec3602
  Platform:
    osname=linux, osvers=3.5.0-23-generic, archname=x86_64-linux
    uname='linux goron 3.5.0-23-generic #35-ubuntu smp thu jan 24
13:15:40 utc 2013 x86_64 x86_64 x86_64 gnulinux '
    config_args='-de
-Dprefix=/home/andrew/perl5/perlbrew/perls/perl-5.17.8 -Dusedevel
-Aeval:scriptdir=/home/andrew/perl5/perlbrew/perls/perl-5.17.8/bin'
    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 ='-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.7.2', 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 /lib/x86_64-linux-gnu /lib/../lib
/usr/lib/x86_64-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.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'

Locally applied patches:


---
@INC for perl 5.17.9:
    /home/andrew/perl5/perlbrew/perls/perl-5.17.8/lib/site_perl/5.17.9/x86_64-linux
    /home/andrew/perl5/perlbrew/perls/perl-5.17.8/lib/site_perl/5.17.9
    /home/andrew/perl5/perlbrew/perls/perl-5.17.8/lib/5.17.9/x86_64-linux
    /home/andrew/perl5/perlbrew/perls/perl-5.17.8/lib/5.17.9
    .

---
Environment for perl 5.17.9:
    HOME=/home/andrew
    LANG=en_US.UTF-8
    LANGUAGE=
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/andrew/perl5/perlbrew/bin:/home/andrew/perl5/perlbrew/perls/perl-5.17.8/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
    PERLBREW_BASHRC_VERSION=0.58
    PERLBREW_HOME=/home/andrew/.perlbrew
    PERLBREW_MANPATH=/home/andrew/perl5/perlbrew/perls/perl-5.17.8/man
    PERLBREW_PATH=/home/andrew/perl5/perlbrew/bin:/home/andrew/perl5/perlbrew/perls/perl-5.17.8/bin
    PERLBREW_PERL=perl-5.17.8
    PERLBREW_ROOT=/home/andrew/perl5/perlbrew
    PERLBREW_VERSION=0.58
    PERL_BADLANG (unset)
    SHELL=/bin/bash


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