Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reparse compile-time /(?{})/ in right scope
When a compile-time regex like /...(?{ code-block }) .../ is compiled in the presence of constant and concat overloading, this can cause (still at compile-time) for the pattern to be evaled and re-compiled, in order to re-compile any code-blocks that got messed up during the overloading and thus whose text no longer matches that which the perl parser previously compiled. When this happens, eval_sv() happens to be called when the perl parser is still in compiling state; normally its called from running state. This tickles an undiscovered bug in Perl_find_runcv_where(), which finds the current cop sequence by looking at PL_curcop->cop_seq. At compile time, we need to get it from PL_cop_seqmax instead.
- Loading branch information