diff options
author | Ruslan Zakirov <ruz@bestpractical.com> | 2012-10-13 21:27:12 +0400 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-12-11 08:59:41 -0800 |
commit | a88bf2bcaa12203b1be20c254990b132faf927dd (patch) | |
tree | be3daa8d46f9eaf5e418e2a27d261ae5633b484d /pp_hot.c | |
parent | b1babc516d40c1a9d24a2eabf3c7649c4c3e7a00 (diff) | |
download | perl-a88bf2bcaa12203b1be20c254990b132faf927dd.tar.gz |
we need duplicates counter only in list context
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1092,12 +1092,11 @@ PP(pp_aassign) if (*relem) sv_setsv(tmpstr,*relem); /* value */ relem++; - if (gimme != G_VOID) { + if (gimme == G_ARRAY) { if (hv_exists_ent(hash, sv, 0)) /* key overwrites an existing entry */ duplicates += 2; - else - if (gimme == G_ARRAY) { + else { /* copy element back: possibly to an earlier * stack location if we encountered dups earlier */ *topelem++ = sv; |