diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-04-29 21:15:25 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-05-29 09:36:26 -0700 |
commit | 1efec5ed466a1faf287ecbdfe8715be7ffef7712 (patch) | |
tree | 8da27436452a53b0ffdfb9b2d14dd8016a0647c7 /pp.c | |
parent | abe56f58d6e4e4e24b5ecc880dddc33719cdd816 (diff) | |
download | perl-1efec5ed466a1faf287ecbdfe8715be7ffef7712.tar.gz |
Add &CORE::pos
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -5934,6 +5934,7 @@ PP(pp_coreargs) whicharg++; switch (oa & 7) { case OA_SCALAR: + try_defsv: if (!numargs && defgv && whicharg == minargs + 1) { PERL_SI * const oldsi = PL_curstackinfo; I32 const oldcxix = oldsi->si_cxix; @@ -5981,7 +5982,8 @@ PP(pp_coreargs) } break; case OA_SCALARREF: - { + if (!numargs) goto try_defsv; + else { const bool wantscalar = PL_op->op_private & OPpCOREARGS_SCALARMOD; if (!svp || !*svp || !SvROK(*svp) @@ -6005,8 +6007,8 @@ PP(pp_coreargs) : "reference to one of [$@%*]" ); PUSHs(SvRV(*svp)); - break; } + break; default: DIE(aTHX_ "panic: unknown OA_*: %x", (unsigned)(oa&7)); } |