This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3aa8deb
)
Tease apart the keyword/subroutine test in S_checkcomma.
author
Nicholas Clark
<nick@ccl4.org>
Fri, 10 Mar 2006 10:50:29 +0000
(10:50 +0000)
committer
Nicholas Clark
<nick@ccl4.org>
Fri, 10 Mar 2006 10:50:29 +0000
(10:50 +0000)
p4raw-id: //depot/perl@27458
toke.c
patch
|
blob
|
blame
|
history
diff --git
a/toke.c
b/toke.c
index
8ee3b84
..
11fcb65
100644
(file)
--- a/
toke.c
+++ b/
toke.c
@@
-10202,11
+10202,17
@@
S_checkcomma(pTHX_ register char *s, const char *name, const char *what)
s++;
if (*s == ',') {
I32 kw;
+ CV *cv;
*s = '\0'; /* XXX If we didn't do this, we could const a lot of toke.c */
- kw = keyword(w, s - w)
|| get_cv(w, FALSE) != 0
;
+ kw = keyword(w, s - w);
*s = ',';
if (kw)
return;
+ *s = '\0';
+ cv = get_cv(w, FALSE);
+ *s = ',';
+ if (cv)
+ return;
Perl_croak(aTHX_ "No comma allowed after %s", what);
}
}