summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-07-18 22:30:52 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-07-18 22:30:52 -0700
commit95f7e41f60129c14cd75136c4109bb686ac0141b (patch)
tree91a871f20d503c8850f3c69aedadd238ad17f2ad /pp.c
parentf0b90de1127cfd7f88a667aff4553d624d6e451d (diff)
downloadperl-95f7e41f60129c14cd75136c4109bb686ac0141b.tar.gz
[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.
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c8
1 files changed, 7 insertions, 1 deletions
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);