summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2012-11-12 10:36:55 +0000
committerDavid Mitchell <davem@iabyn.com>2012-11-12 10:36:55 +0000
commit18c931a3833eccac01983e3e50239ca36de82ec4 (patch)
tree3f9c5470a898ace34dc8b4feecf9ef025c076790 /op.c
parent94691b809310834faf58c42ca79fa08825387969 (diff)
downloadperl-18c931a3833eccac01983e3e50239ca36de82ec4.tar.gz
PADRANGE: don't assume targs are contiguous
Normally in something like my($x,$y,$z), the 3 targs are contiguous; however eternal modules like Function::Parameters can break that assumption, so don't assume it.
Diffstat (limited to 'op.c')
-rw-r--r--op.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/op.c b/op.c
index b4a845e7b2..8fab3982d0 100644
--- a/op.c
+++ b/op.c
@@ -11020,10 +11020,11 @@ Perl_rpeep(pTHX_ register OP *o)
else {
if ((p->op_private & OPpLVAL_INTRO) != intro)
break;
- /* we expect targs to be contiguous in my($a,$b,$c)
- * but not in ($a, $x, $z). In the latter case, stop
- * on the first non-contiguous padop */
- if (!intro && p->op_targ != base + count)
+ /* Note that you'd normally expect targs to be
+ * contiguous in my($a,$b,$c), but that's not the case
+ * when external modules start doing things, e.g.
+ i* Function::Parameters */
+ if (p->op_targ != base + count)
break;
assert(p->op_targ == base + count);
/* all the padops should be in the same context */