summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-08-26 22:28:52 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-08-26 22:28:52 -0700
commit17008668bc1759e4a1ff55f42c3d738e5534b5dc (patch)
treeaf43fc270c8f831d82cf727d09f859085d3b61fa /op.c
parentcb85b2dba9dd71becf505fd4190513a7648f1ff8 (diff)
downloadperl-17008668bc1759e4a1ff55f42c3d738e5534b5dc.tar.gz
&CORE::foo() for (sys)read and recv
These are grouped together because they all have \$ in their prototypes. This commit allows the subs in the CORE package under those names to be called through references and via &ampersand syntax. The coreargs op in the subroutine is marked with the OPpSCALARMOD flag. (scalar_mod_type in op.c returns true for these three ops, indicating that the OA_SCALARREF parameter is \$, not \[$@%(&)*].) pp_coreargs uses that flag to decide what arguments to reject.
Diffstat (limited to 'op.c')
-rw-r--r--op.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/op.c b/op.c
index 4f42daa1da..73dccf8f17 100644
--- a/op.c
+++ b/op.c
@@ -10382,6 +10382,8 @@ Perl_coresub_op(pTHX_ SV * const coreargssv, const int code,
o = convert(opnum,0,argop);
if (is_handle_constructor(o, 2))
argop->op_private |= OPpCOREARGS_DEREF2;
+ if (scalar_mod_type(NULL, opnum))
+ argop->op_private |= OPpCOREARGS_SCALARMOD;
goto onearg;
}
}