This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pad.c: Don’t copy shared hash key targets when cloning
[perl5.git] / pad.c
diff --git a/pad.c b/pad.c
index e44083b..082dc66 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -2445,7 +2445,7 @@ Perl_padlist_dup(pTHX_ PADLIST *srcpad, CLONE_PARAMS *param)
                        }
                    }
                }
-               else if (IS_PADGV(oldpad[ix]) || IS_PADCONST(oldpad[ix])) {
+               else if (IS_PADGV(oldpad[ix]) || PadnamePV(names[ix])) {
                    pad1a[ix] = sv_dup_inc(oldpad[ix], param);
                }
                else {