This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Allow ampersand calls for CORE subs with $*$$**$ protos
authorFather Chrysostomos <sprout@cpan.org>
Thu, 25 Aug 2011 16:50:02 +0000 (09:50 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 25 Aug 2011 16:50:02 +0000 (09:50 -0700)
commitc931b03652afbc6f3525df91e6f1b821bf7c9fe3
tree517008b87b4b6b8f94936681a51531ac04ef95d4
parente664e0a4d2b36e9c34f1d617414f811f59792c9b
Allow ampersand calls for CORE subs with $*$$**$ protos

This enables ampersand calls and calls through references for CORE
subs that have * and $ in their prototypes and a fixed number of
arguments.

Usually, the *-prototyped ops have their child ops wrapped in rv2gv’s
(*{}) implicitly.  The rv2gv op is sometimes flagged as an autoviv-
ificatory op, such as the first argument to accept() or open().
S_is_handle_constructor contains the list of ops that turn on
that flag.

This commit makes the coreargs op use a couple of flags to serve the
same purpose.  pp_coreargs itself calls S_rv2gv (split out from
pp_rv2gv recently for precisely this purpose) with arguments based on
its own flags.

Currently the autovivified glob gets a name like main::_GEN_0 instead
of main::$a.  I think we can live with that.
gv.c
op.c
pp.c
t/op/coresubs.t