Give not and getprotobynumber listop prototypes
authorFather Chrysostomos <sprout@cpan.org>
Mon, 15 Aug 2011 16:23:50 +0000 (09:23 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 15 Aug 2011 19:47:33 +0000 (12:47 -0700)
They parse as list operators, but their prototypes imply unop
precedence.

op.c
t/op/cproto.t

diff --git a/op.c b/op.c
index 6c46f2a..775705b 100644 (file)
--- a/op.c
+++ b/op.c
@@ -10420,6 +10420,7 @@ Perl_core_prototype(pTHX_ SV *sv, const char *name, const int code,
     }
     if (defgv && str[0] == '$')
        str[0] = '_';
+    if (code == -KEY_not || code == -KEY_getprotobynumber) str[n++] = ';';
     str[n++] = '\0';
     sv_setpvn(sv, str, n - 1);
     if (opnum) *opnum = i;
index e995416..a587a31 100644 (file)
@@ -105,7 +105,7 @@ getpgrp (;$)
 getppid ()
 getpriority ($$)
 getprotobyname ($)
-getprotobynumber ($)
+getprotobynumber ($;)
 getprotoent ()
 getpwent ()
 getpwnam ($)
@@ -153,7 +153,7 @@ my undef
 ne undef
 next undef
 no undef
-not ($)
+not ($;)
 oct (_)
 open (*;$@)
 opendir (*$)