From 605aedcce76632b4ab6d032b928335097c11784a Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Mon, 22 Nov 2010 16:42:00 -0800 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20CLONE=20nameless=20hashes?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The cloning code was trying to call CLONE on nameless hashes that nonetheless had an effective name (HvENAME). This can happen if a nameless hash is assigned over a stash, as in *foo:: = {} or if a stash is undefined: undef %foo:: (The effective name is how perl tracks the location internally, for the sake of updating MRO caches.) --- sv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sv.c b/sv.c index 39a76b5..5705890 100644 --- a/sv.c +++ b/sv.c @@ -11874,7 +11874,7 @@ S_sv_dup_common(pTHX_ const SV *const sstr, CLONE_PARAMS *const param) : 0; /* Record stashes for possible cloning in Perl_clone(). */ - if (hvname) + if (HvNAME(sstr)) av_push(param->stashes, dstr); } } -- 2.7.4