* but the regex compilation API passes just the pm flags, not the op
* itself */
#define PMf_IS_QR (1<<(PMf_BASE_SHIFT+12))
+#define PMf_USE_RE_EVAL (1<<(PMf_BASE_SHIFT+13)) /* use re'eval' in scope */
-#if PMf_BASE_SHIFT+12 > 31
+#if PMf_BASE_SHIFT+13 > 31
# error Too many PMf_ bits used. See above and regnodes.h for any spare in middle
#endif
)(aTHX_ args, nargs, pm->op_code_list, eng, re,
&is_bare_re,
(pm->op_pmflags & RXf_PMf_COMPILETIME),
- pm->op_pmflags);
+ pm->op_pmflags |
+ (PL_op->op_flags & OPf_SPECIAL ? PMf_USE_RE_EVAL : 0));
if (pm->op_pmflags & PMf_HAS_CV)
((struct regexp *)SvANY(new_re))->qr_anoncv
= (CV*) SvREFCNT_inc(PAD_SV(PL_op->op_targ));
*
* orig_rx_flags contains RXf_* flags. See perlreapi.pod for more details.
*
- * pm_flags contains the PMf_* flags from the calling PMOP. Currently
- * we're only interested in PMf_HAS_CV and PMf_IS_QR.
+ * pm_flags contains the PMf_* flags, typically based on those from the
+ * pm_flags field of the related PMOP. Currently we're only interested in
+ * PMf_HAS_CV, PMf_IS_QR, PMf_USE_RE_EVAL.
*
* We can't allocate space until we know how big the compiled form will be,
* but we can't compile it (and thus know how big it is) until we've got a