diff options
-rw-r--r-- | Fun.xs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -244,10 +244,10 @@ static OP *parse_fun(pTHX_ GV *namegv, SV *psobj, U32 *flagsp) CV *code; OP *arg_assign = NULL, *block, *name; - floor = start_subparse(0, CVf_ANON); lex_read_space(0); if (isIDFIRST(*(PL_parser->bufptr)) || *(PL_parser->bufptr) == ':') { + floor = start_subparse(0, 0); function_name = sv_2mortal(newSVpvs("")); while (isIDFIRST(*(PL_parser->bufptr)) || *(PL_parser->bufptr) == ':') { if (lex_peek_unichar(0) == ':') { @@ -260,6 +260,9 @@ static OP *parse_fun(pTHX_ GV *namegv, SV *psobj, U32 *flagsp) } } } + else { + floor = start_subparse(0, CVf_ANON); + } lex_read_space(0); if (lex_peek_unichar(0) == '(') { |