From: Nicholas Clark Date: Sat, 13 Mar 2010 10:35:13 +0000 (+0000) Subject: In Perl_sv_compile_2op(), remove a suggestion to merge code with pp_entersub. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ee23ad3b3dcc9a9c86a27ce63fe6418067923a82;p=p5sagit%2Fp5-mst-13.2.git In Perl_sv_compile_2op(), remove a suggestion to merge code with pp_entersub. Add a comment explaining the problems with this function. --- diff --git a/pp_ctl.c b/pp_ctl.c index 742bc3d..de34879 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2896,13 +2896,20 @@ S_docatch(pTHX_ OP *o) return NULL; } +/* James Bond: Do you expect me to talk? + Auric Goldfinger: No, Mr. Bond. I expect you to die. + + This code is an ugly hack, doesn't work with lexicals in subroutines that are + called more than once, and is only used by regcomp.c, for (?{}) blocks. + + Currently it is not used outside the core code. Best if it stays that way. +*/ OP * Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, const char *code, PAD** padp) /* sv Text to convert to OP tree. */ /* startop op_free() this to undo. */ /* code Short string id of the caller. */ { - /* FIXME - how much of this code is common with pp_entereval? */ dVAR; dSP; /* Make POPBLOCK work. */ PERL_CONTEXT *cx; SV **newsp;