This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
permit goto at top level of multicalled sub
authorZefram <zefram@fysh.org>
Mon, 23 Jan 2017 02:25:50 +0000 (02:25 +0000)
committerZefram <zefram@fysh.org>
Mon, 23 Jan 2017 22:25:42 +0000 (22:25 +0000)
commit3c157b3cf0631c69ffa5aa2d55b9199bf93b22a9
treed7f916b738c0777c551896e40c7fb6a96830a56e
parent7cb258c16018b4c963dd48cee7578d26045ff04c
permit goto at top level of multicalled sub

A multicalled sub is reckoned to be a pseudo block, out of which it is
not permissible to goto.  However, the test for a pseudo block was being
applied too early, preventing not just escape from a multicalled sub but
also a goto at the top level within the sub.  This is a bug similar, but
not identical, to [perl #113938].  Now the test is deferred, permitting
goto at the sub's top level but still forbidding goto out of it.
pp_ctl.c
t/op/goto.t