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 /t/mro | |
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 't/mro')
-rw-r--r-- | t/mro/basic.t | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/t/mro/basic.t b/t/mro/basic.t index 10aa44cbc4..cc1386c5f4 100644 --- a/t/mro/basic.t +++ b/t/mro/basic.t @@ -3,7 +3,7 @@ use strict; use warnings; -BEGIN { require q(./test.pl); } plan(tests => 54); +BEGIN { require q(./test.pl); } plan(tests => 55); require mro; @@ -346,3 +346,10 @@ is(eval { MRO_N->testfunc() }, 123); @{*fednu::ISA} = "pyfg"; ok +fednu->isa("pyfg"), 'autovivifying @ISA via *{@ISA}'; } + +{ + sub Detached::method; + my $h = delete $::{"Detached::"}; + eval { local *Detached::method }; + is $@, "", 'localising gv-with-cv belonging to detached package'; +} |