From 95f7e41f60129c14cd75136c4109bb686ac0141b Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Mon, 18 Jul 2011 22:30:52 -0700 Subject: [perl #94984] Remove prototypes for infix ops This commit makes prototype("CORE::$_") return undef for these infix ops, instead of the prototype (or error) shown here: and () cmp Error: Cannot find an op number for cmp eq ($$) ge ($$) gt ($$) le ($$) lt ($$) ne ($$) or () x Error: Cannot find an op number for x xor ($$) Those prototypes are not actually correct, and dying for what are real Perl keywords is just mean. --- pp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pp.c') diff --git a/pp.c b/pp.c index 3c46fc3f31..141f4bbbe7 100644 --- a/pp.c +++ b/pp.c @@ -436,7 +436,13 @@ PP(pp_prototype) char str[ MAX_ARGS_OP * 2 + 2 ]; /* One ';', one '\0' */ if (code == -KEY_chop || code == -KEY_chomp - || code == -KEY_exec || code == -KEY_system) + || code == -KEY_exec || code == -KEY_system + || code == -KEY_and || code == -KEY_cmp + || code == -KEY_eq || code == -KEY_ge + || code == -KEY_gt || code == -KEY_le + || code == -KEY_lt || code == -KEY_lt + || code == -KEY_ne || code == -KEY_or + || code == -KEY_x || code == -KEY_xor) goto set; if (code == -KEY_mkdir) { ret = newSVpvs_flags("_;$", SVs_TEMP); -- cgit v1.2.1