On Sun, Feb 17, 2013 at 10:07:37PM -0800, Andrew Rodland wrote: > 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'? Given that Regexp/Grammars.pm is 6000+ lines of code, is it possible to supply a short test script (with no external dependencies) that uses overload::constant qr and overloaded qq in such a way that demonstrates the changed behaviour? Thanks. -- No man treats a motor car as foolishly as he treats another human being. When the car will not go, he does not attribute its annoying behaviour to sin, he does not say, You are a wicked motorcar, and I shall not give you any more petrol until you go. He attempts to find out what is wrong and set it right. -- Bertrand Russell, Has Religion Made Useful Contributions to Civilization?Thread Previous | Thread Next