summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-04-29 21:15:25 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-05-29 09:36:26 -0700
commit1efec5ed466a1faf287ecbdfe8715be7ffef7712 (patch)
tree8da27436452a53b0ffdfb9b2d14dd8016a0647c7 /pp.c
parentabe56f58d6e4e4e24b5ecc880dddc33719cdd816 (diff)
downloadperl-1efec5ed466a1faf287ecbdfe8715be7ffef7712.tar.gz
Add &CORE::pos
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index b1ab8b9a38..c89b083b82 100644
--- a/pp.c
+++ b/pp.c
@@ -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));
}