In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/ec192197b904194f8a514368e774522e9b83add8?hp=558b442404962caba5a81ad5b785fef3cf5eac5d>
- Log ----------------------------------------------------------------- commit ec192197b904194f8a514368e774522e9b83add8 Author: Father Chrysostomos <[email protected]> Date: Tue Dec 7 18:28:46 2010 -0800 Avoid setting PL_cv_has_eval unnecessarily Quoting op.c: /* /$x/ may cause an eval, since $x might be qr/(?{..})/ */ But the (?{..})âs compilation is only ever reached in the scope of âuse re 'eval'â, so we can avoid setting PL_cv_has_eval (and the slight overhead that entails) when that pragma is off. ----------------------------------------------------------------------- Summary of changes: op.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/op.c b/op.c index 469a008..13462d1 100644 --- a/op.c +++ b/op.c @@ -3930,7 +3930,7 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg) rcop->op_targ = pad_alloc(rcop->op_type, SVs_PADTMP); /* /$x/ may cause an eval, since $x might be qr/(?{..})/ */ - PL_cv_has_eval = 1; + if (PL_hints & HINT_RE_EVAL) PL_cv_has_eval = 1; /* establish postfix order */ if (pm->op_pmflags & PMf_KEEP || !(PL_hints & HINT_RE_EVAL)) { -- Perl5 Master Repository
