diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-11-22 16:42:00 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-11-22 16:43:32 -0800 |
commit | 605aedcce76632b4ab6d032b928335097c11784a (patch) | |
tree | 0a6f0fac2bf2083b91da89595f7d7bcf7fa2e0f7 | |
parent | 0a4df5147978fdeecf143dcc58bc4e04e196aced (diff) | |
download | perl-605aedcce76632b4ab6d032b928335097c11784a.tar.gz |
Don’t CLONE nameless hashes
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.)
-rw-r--r-- | sv.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } } |