diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-11-28 12:39:04 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-11-29 09:11:30 -0800 |
commit | 959f7ad7c12f768f896b4dd48b5b7f41b6b087b5 (patch) | |
tree | 6ffcb8d8cbd464f1c3c4c438c0c47c3c48e37022 /scope.c | |
parent | 978a498e17ec54b6f1fc65f3375a62a68f321f99 (diff) | |
download | perl-959f7ad7c12f768f896b4dd48b5b7f41b6b087b5.tar.gz |
Don’t croak for local *DetachedStash::method
save_gp was trying to call mro_method_changed_in even if the stash had
been detached.
This is a regression from 5.12.
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -285,8 +285,9 @@ Perl_save_gp(pTHX_ GV *gv, I32 empty) if (empty) { GP *gp = Perl_newGP(aTHX_ gv); + HV * const stash = GvSTASH(gv); - if (GvCVu(gv)) + if (GvCVu(gv) && stash && HvENAME(stash)) mro_method_changed_in(GvSTASH(gv)); /* taking a method out of circulation ("local")*/ if (GvIOp(gv) && (IoFLAGS(GvIOp(gv)) & IOf_ARGV)) { gp->gp_io = newIO(); |