smarter C<$SIG{FOO} = BAREWORD;> warning
Gurusamy Sarathy [Wed, 28 Oct 1998 18:52:10 +0000 (18:52 +0000)]
p4raw-id: //depot/perl@2111

toke.c

diff --git a/toke.c b/toke.c
index 1827a39..f3e8ce8 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -2728,7 +2728,8 @@ int yylex
                    for (t++; isSPACE(*t); t++) ;
                    if (isIDFIRST_lazy(t)) {
                        t = scan_word(t, tmpbuf, sizeof tmpbuf, TRUE, &len);
-                       if (*t != '(' && perl_get_cv(tmpbuf, FALSE))
+                       for (; isSPACE(*t); t++) ;
+                       if (*t == ';' && perl_get_cv(tmpbuf, FALSE))
                            warner(WARN_SYNTAX,
                                "You need to quote \"%s\"", tmpbuf);
                    }