diff options
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -7685,7 +7685,16 @@ Perl_ck_fun(pTHX_ OP *o) tokid = &kid->op_sibling; kid = kid->op_sibling; } - if (kid && kid->op_type == OP_COREARGS) return o; + if (kid && kid->op_type == OP_COREARGS) { + bool optional = FALSE; + while (oa) { + numargs++; + if (oa & OA_OPTIONAL) optional = TRUE; + oa = oa >> 4; + } + if (optional) o->op_private |= numargs; + return o; + } while (oa) { if (oa & OA_OPTIONAL || (oa & 7) == OA_LIST) { |