diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-08-26 23:50:06 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-08-26 23:58:03 -0700 |
commit | f650fa729f03aabdf12058228971129d911b4aa1 (patch) | |
tree | c3f5c89c23a685ae9e36d2b15dfdc41782ec80ce /pp_ctl.c | |
parent | 014333460b4235140c1e4ad346b2581af7ff6592 (diff) | |
download | perl-f650fa729f03aabdf12058228971129d911b4aa1.tar.gz |
&CORE::reset()
This commit allows &CORE::reset to be called through references and
via ampersand syntax. pp_reset is modified to take into account the
nulls pushed on to the stack in pp_coreargs, which happens because
pp_coreargs has no other way to tell reset how many arguments it’s
actually getting. See commit 0163043a for details.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2007,7 +2007,8 @@ PP(pp_reset) { dVAR; dSP; - const char * const tmps = (MAXARG < 1) ? (const char *)"" : POPpconstx; + const char * const tmps = + (MAXARG < 1 || (!TOPs && !POPs)) ? (const char *)"" : POPpconstx; sv_reset(tmps, CopSTASH(PL_curcop)); PUSHs(&PL_sv_yes); RETURN; |