note
dave_the_m
Because I've changed it so that re code blocks are parsed now by the main perl parser, not by the regex engine calling back into the parser; e.g.
<c>/foo(?{ $x + 1 })/</c> is now parsed in the same manner that
<c>"foo$bar[$x + 1]"</c> always has been. If it misses the parser and gets picked up later by by the regex engine (e.g. due to code appearing from external sources at runtime), then
the engine will insist that 'use re eval' is in scope.
<p>
This fixes lots of the bugs in re eval lexical scoping, while only breaking the occasional edge case. And it creates a simple understandable rule for when 'use re eval' needs to be in effect.
<p>
It also means that the following, which formerly required 'use re eval', no longer does:
<p>
<c>
$foo = 'bar';
/(?{...})$foo/
</c>
<p>
Dave.
1030569
1030773