diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-08-21 19:58:43 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-08-21 19:58:43 -0700 |
commit | 72ec8a821beca962b4748ef16cf7f1ce74119c43 (patch) | |
tree | c1bc23d97a66c45fd455f3b87d1cefdd696f2b95 /op.c | |
parent | c1ff15b2b4d6172bd224dcc6f444d5f0875cd758 (diff) | |
download | perl-72ec8a821beca962b4748ef16cf7f1ce74119c43.tar.gz |
Make unlink with implicit $_ work once more
I broke this with commit ea5703f4. unlink is the only op that has the
OA_DEFGV flag and no scalar or file arguments.
Commit ea5703f4 changed the OA_DEFGV logic in ck_fun to generate a
new $_ op for the first optional parameter, instead of just the first
parameter, to avoid special-casing unpack. But lists are not marked
with OA_OPTIONAL. So this commit changes it to check for list parame-
ters as well.
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -7682,7 +7682,7 @@ Perl_ck_fun(pTHX_ OP *o) } while (oa) { - if (oa & OA_OPTIONAL) { + if (oa & OA_OPTIONAL || (oa & 7) == OA_LIST) { if (!kid && !seen_optional && PL_opargs[type] & OA_DEFGV) *tokid = kid = newDEFSVOP(); seen_optional = TRUE; |