This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Allow ampersand calls to CORE subs with (_) proto
authorFather Chrysostomos <sprout@cpan.org>
Thu, 25 Aug 2011 06:31:28 +0000 (23:31 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 25 Aug 2011 06:32:41 +0000 (23:32 -0700)
commit46e00a91c0fa7d86de7f65504ba0a402c422d58b
tree80b77a8bbb9a14b780485c7a2a77a706630a946e
parentc086f97a1425c2aa61dd3625b890e1236b1d4bc4
Allow ampersand calls to CORE subs with (_) proto

This commit adds all subs with a (_) prototype to the list of those
that can be called with ampersand syntax or through references.  These
have bodies like this:

$ ./perl -Ilib -MO=Concise,CORE::abs -e 'BEGIN{\&CORE::abs}'
CORE::abs:
3  <1> leavesub[1 ref] K/REFC,1 ->(end)
2     <1> abs[t1] sK/1 ->3
1        <$> coreargs(IV 111) s ->2
-e syntax OK

coreargs fetches the caller’s $_ if there are no arguments passed.
gv.c
pp.c
t/op/coresubs.t