summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorPeter Martini <PeterCMartini@GMail.com>2013-06-22 00:09:12 -0400
committerSteffen Mueller <smueller@cpan.org>2013-06-22 15:12:34 +0200
commit80e09529483332d99472e6944c1f7b1abc89c89c (patch)
tree5e3349e374ccd876f87b0fcb419acd0385488a13 /toke.c
parent0e05e560edc12120d297a77996d0dfa53a9858af (diff)
downloadperl-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.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/toke.c b/toke.c
index 5ad89f10d7..0a1671505d 100644
--- a/toke.c
+++ b/toke.c
@@ -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 == '$') {