Re: Named-capture regex syntax
[p5sagit/p5-mst-13.2.git] / op.c
diff --git a/op.c b/op.c
index 626f3e8..8aca413 100644 (file)
--- a/op.c
+++ b/op.c
@@ -3314,6 +3314,7 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg)
            OP *lastop = NULL;
            for (curop = LINKLIST(repl); curop!=repl; curop = LINKLIST(curop)) {
                if (curop->op_type == OP_SCOPE
+                       || curop->op_type == OP_LEAVE
                        || (PL_opargs[curop->op_type] & OA_DANGEROUS)) {
                    if (curop->op_type == OP_GV) {
                        GV * const gv = cGVOPx_gv(curop);