diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-09-20 11:53:49 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-09-20 11:53:49 -0500 |
commit | 5fd2d16154bc75b2174e9936999058daee900e3a (patch) | |
tree | aa37c7b41ca4c3c01789220719c58f39390cac90 | |
parent | d014c200afc692c5aebacd8afa78150e3246afa7 (diff) | |
download | fun-5fd2d16154bc75b2174e9936999058daee900e3a.tar.gz fun-5fd2d16154bc75b2174e9936999058daee900e3a.zip |
don't compile named functions as anon
-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) == '(') { |