&CORE::send() and &CORE::syswrite()
authorFather Chrysostomos <sprout@cpan.org>
Sat, 27 Aug 2011 18:13:48 +0000 (11:13 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 28 Aug 2011 00:47:15 +0000 (17:47 -0700)
This commit makes &CORE::send and &CORE::syswrite callable through references and & syntax.

All this commit has to do is remove them from the exception list in
gv.c, as previous commits happen to have made them work.  (I didn’t
realise originally that these use pushmark.)

gv.c
t/op/coreamp.t

diff --git a/gv.c b/gv.c
index e3bc866..d5b497f 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -1358,12 +1358,11 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
            case KEY_lstat:
            case KEY_pop:
            case KEY_push:
-           case KEY_send:
            case KEY_setpgrp: case KEY_shift: case KEY_sleep:
            case KEY_splice:
            case KEY_srand: case KEY_stat: case KEY_substr:
            case KEY_sysopen:
-           case KEY_system: case KEY_syswrite:
+           case KEY_system:
            case KEY_tell: case KEY_tie: case KEY_tied:
            case KEY_truncate: case KEY_umask: case KEY_unlink:
            case KEY_unpack: case KEY_unshift: case KEY_untie:
index cff1487..06464f1 100644 (file)
@@ -646,6 +646,8 @@ like $@, qr/^Too many arguments for select system call at /,
 
 test_proto "sem$_" for qw "ctl get op";
 
+test_proto 'send';
+
 test_proto "set$_" for qw '
   grent hostent netent priority protoent pwent servent sockopt
 ';
@@ -665,6 +667,7 @@ test_proto 'symlink';
 test_proto 'syscall';
 test_proto 'sysread';
 test_proto 'sysseek';
+test_proto 'syswrite';
 test_proto 'telldir';
 
 test_proto 'time';