Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Broken compatibility for recursive regex in Perl 5.8.4

by dave_the_m (Monsignor)
on May 25, 2004 at 00:30 UTC ( #356089=note: print w/replies, xml ) Need Help??

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.


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.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://356089]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2020-09-29 17:12 GMT
Find Nodes?
    Voting Booth?
    If at first I donít succeed, I Ö

    Results (148 votes). Check out past polls.