diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-11-21 23:43:17 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-11-22 00:07:20 -0800 |
commit | 84ed01088568ffe9cf49047f10500ca511db0c9e (patch) | |
tree | 614defca700a49e07194fa9e5b177120fc2ba50b /pp.c | |
parent | 8f84cc86e11f13b85c64fd0205261e12bef9e7f9 (diff) | |
download | perl-84ed01088568ffe9cf49047f10500ca511db0c9e.tar.gz |
[perl #80628] __SUB__
After much alternation, altercation and alteration, __SUB__ is
finally here.
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -5794,6 +5794,25 @@ PP(pp_coreargs) RETURN; } +PP(pp_runcv) +{ + dSP; + CV *cv; + if (PL_op->op_private & OPpOFFBYONE) { + PERL_SI * const oldsi = PL_curstackinfo; + I32 const oldcxix = oldsi->si_cxix; + if (oldcxix) oldsi->si_cxix--; + else PL_curstackinfo = oldsi->si_prev; + cv = find_runcv(NULL); + PL_curstackinfo = oldsi; + oldsi->si_cxix = oldcxix; + } + else cv = find_runcv(NULL); + XPUSHs(CvUNIQUE(cv) ? &PL_sv_undef : sv_2mortal(newRV((SV *)cv))); + RETURN; +} + + /* * Local variables: * c-indentation-style: bsd |