This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add pointer to email explaining why eval {goto &foo} is banned
[perl5.git] / pp_ctl.c
index 3a6c64f..fbcb1c4 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2298,6 +2298,7 @@ PP(pp_goto)
                dounwind(cxix);
            TOPBLOCK(cx);
            SPAGAIN;
+           /* ban goto in eval: see <20050521150056.GC20213@iabyn.com> */
            if (CxTYPE(cx) == CXt_EVAL) {
                if (CxREALEVAL(cx))
                    DIE(aTHX_ "Can't goto subroutine from an eval-string");