diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-07-02 21:26:13 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-09-15 22:44:54 -0700 |
commit | 4b473a5a056427bc93ffb46dbb873c9e6ec5287f (patch) | |
tree | e6603cbb600c5dbac82436bb013ed6a611e2877d /toke.c | |
parent | 945534e1d3d80e5758511e1e2700775217d07796 (diff) | |
download | perl-4b473a5a056427bc93ffb46dbb873c9e6ec5287f.tar.gz |
Make do sub() respect our declarations
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -7423,10 +7423,15 @@ Perl_yylex(pTHX) if (*s == '{') PRETERMBLOCK(DO); if (*s != '\'') { - d = scan_word(s, PL_tokenbuf, sizeof PL_tokenbuf, 1, &len); - if (len) { + *PL_tokenbuf = '&'; + d = scan_word(s, PL_tokenbuf + 1, sizeof PL_tokenbuf - 1, + 1, &len); + if (len && !keyword(PL_tokenbuf + 1, len, 0)) { d = SKIPSPACE1(d); - if (*d == '(') s = force_word(s,WORD,TRUE,TRUE,FALSE); + if (*d == '(') { + PL_pending_ident = '&'; + s = d; + } } } if (orig_keyword == KEY_do) { |