make weak keyword check look for defined(&lock), not
Gurusamy Sarathy [Sat, 4 Dec 1999 21:55:27 +0000 (21:55 +0000)]
merely defined(*lock)

p4raw-id: //depot/perl@4643

toke.c

diff --git a/toke.c b/toke.c
index b4377d1..8eac820 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -3502,6 +3502,7 @@ Perl_yylex(pTHX)
            }
            else if (gv && !gvp
                     && -tmp==KEY_lock  /* XXX generalizable kludge */
+                    && GvCVu(gv)
                     && !hv_fetch(GvHVn(PL_incgv), "Thread.pm", 9, FALSE))
            {
                tmp = 0;                /* any sub overrides "weak" keyword */