diff options
author | Peter Martini <PeterCMartini@GMail.com> | 2013-06-22 00:09:12 -0400 |
---|---|---|
committer | Steffen Mueller <smueller@cpan.org> | 2013-06-22 15:12:34 +0200 |
commit | 80e09529483332d99472e6944c1f7b1abc89c89c (patch) | |
tree | 5e3349e374ccd876f87b0fcb419acd0385488a13 /toke.c | |
parent | 0e05e560edc12120d297a77996d0dfa53a9858af (diff) | |
download | perl-80e09529483332d99472e6944c1f7b1abc89c89c.tar.gz |
Treat a consecutive semicolons in a prototype as 1
This also intentionally ignores spaces; they're ignored by
the toker, but if the prototype was set externally, they
may have leaked in. This is just for the method/not method
checks.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -3995,13 +3995,13 @@ S_intuit_method(pTHX_ char *start, GV *gv, CV *cv) if (gv && SvTYPE(gv) == SVt_PVGV && GvIO(gv)) return 0; if (cv && SvPOK(cv)) { - const char *proto = CvPROTO(cv); - if (proto) { - if (*proto == ';') - proto++; - if (*proto == '*') - return 0; - } + const char *proto = CvPROTO(cv); + if (proto) { + while (*proto && (isSPACE(*proto) || *proto == ';')) + proto++; + if (*proto == '*') + return 0; + } } if (*start == '$') { |