This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid setting PL_cv_has_eval unnecessarily
authorFather Chrysostomos <sprout@cpan.org>
Wed, 8 Dec 2010 02:28:46 +0000 (18:28 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 8 Dec 2010 02:28:46 +0000 (18:28 -0800)
commitec192197b904194f8a514368e774522e9b83add8
tree6cf2d32e4e27d06db662cfaad427fa3545ac431a
parent558b442404962caba5a81ad5b785fef3cf5eac5d
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.
op.c