in reply to Broken compatibility for recursive regex in Perl 5.8.4

This is because until 5.8.4, the use strict; wasn't being propagated into the code within the regex; now it is, so it complains that the var hasn't been declared (because the declaration doesn't come into effect until the statement following the our.

The error message is a bit misleading due the way Perl code within regexes is currently handled - something I'm hoping to fix for 5.10.0.

Dave.

Replies are listed 'Best First'.
Re: Re: Broken compatibility for recursive regex in Perl 5.8.4
by bsb (Priest) on May 25, 2004 at 11:43 UTC
    Will the 5.8.4 scope changes fix this bug: Spurious re 'eval'; warning ?
    $ perl -Mre=eval -e '/ (??{ "(?{1})" }) $_ /x' Eval-group not allowed at runtime, use re 'eval' in regex m/(?{1})/ at + -e line 1.

      No, for that you'll need to wait for the overhaul of the hints system referred to here. I believe Mark-Jason Dominus is currently working on this.

      Hugo