diff --git a/pp_ctl.c b/pp_ctl.c index ddcbf7c0e3d4..c046eda267fc 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2676,6 +2676,7 @@ S_dofindlabel(pTHX_ OP *o, const char *label, STRLEN len, U32 flags, OP **opstac && o->op_type != OP_LINESEQ && o->op_type != OP_SREFGEN && o->op_type != OP_ENTEREVAL + && o->op_type != OP_GLOB && o->op_type != OP_RV2CV) { OP * const kid = cUNOPo->op_first; if (OP_GIMME(kid, 0) != G_SCALAR || OpHAS_SIBLING(kid)) diff --git a/t/op/goto.t b/t/op/goto.t index 7f03bc00e4aa..88715c39defa 100644 --- a/t/op/goto.t +++ b/t/op/goto.t @@ -10,7 +10,7 @@ BEGIN { use warnings; use strict; -plan tests => 123; +plan tests => 124; our $TODO; my $deprecated = 0; @@ -858,6 +858,8 @@ is sub { goto z; exit do { z: return "foo" } }->(), 'foo', 'goto into exit'; is sub { goto z; eval do { z: "'foo'" } }->(), 'foo', 'goto into eval'; +is join(",",sub { goto z; glob do { z: "foo bar" } }->()), 'foo,bar', + 'goto into glob'; # [perl #132799] # Erroneous inward goto warning, followed by crash.