diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-09-06 22:57:50 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-09-15 22:45:08 -0700 |
commit | 689aac7bfc3ed834caafc028165e62b1badfb320 (patch) | |
tree | 5c1e955cd06b7f2ba422a338508916ef7cd72867 /toke.c | |
parent | 445f13ff0d8bfc70e382b8372318dad6ad0d9bd2 (diff) | |
download | perl-689aac7bfc3ed834caafc028165e62b1badfb320.tar.gz |
Don’t mention pkg in proto warnings for lex subs
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -8279,7 +8279,11 @@ Perl_yylex(pTHX) if (PL_madskills) nametoke = newSVpvn_flags(s, d - s, SvUTF8(PL_linestr)); #endif - if (memchr(tmpbuf, ':', len) || key == KEY_our) + *PL_tokenbuf = '&'; + if (memchr(tmpbuf, ':', len) || key != KEY_sub + || pad_findmy_pvn( + PL_tokenbuf, len + 1, UTF ? SVf_UTF8 : 0 + ) != NOT_IN_PAD) sv_setpvn(PL_subname, tmpbuf, len); else { sv_setsv(PL_subname,PL_curstname); @@ -8290,7 +8294,6 @@ Perl_yylex(pTHX) SvUTF8_on(PL_subname); have_name = TRUE; - *PL_tokenbuf = '&'; #ifdef PERL_MAD start_force(0); |