diff options
author | Gerard Goossen <gerard@ggoossen.net> | 2009-11-21 12:16:07 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2009-11-21 19:49:48 +0100 |
commit | b500e03bf95eb884a53407409b4e755d303171a4 (patch) | |
tree | 2ea466912e5adede52f4d5b2907358ab8f9602cc /pp_ctl.c | |
parent | 021f53de09926928546378b3552f9240c9241dde (diff) | |
download | perl-b500e03bf95eb884a53407409b4e755d303171a4.tar.gz |
deprecate "goto" to jump into a construct
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2698,6 +2698,12 @@ PP(pp_goto) DIE(aTHX_ "Can't \"goto\" into the middle of a foreach loop"); } + if (*enterops && enterops[1]) { + I32 i = enterops[1]->op_type == OP_ENTER && in_block ? 2 : 1; + if (enterops[i]) + deprecate("\"goto\" to jump into a construct"); + } + /* pop unwanted frames */ if (ix < cxstack_ix) { |