summaryrefslogtreecommitdiff
path: root/t/mro
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-11-16 16:29:27 -0800
committerFather Chrysostomos <sprout@cpan.org>2010-11-16 17:48:25 -0800
commit0290c7107ccd726700dd863729fdba3207051905 (patch)
tree2a900a2238252adde2ed5c7fa6ad9626a3f9f205 /t/mro
parentc2736fce83b2520da4fdb4759d0c6cd91860d6de (diff)
downloadperl-0290c7107ccd726700dd863729fdba3207051905.tar.gz
Don’t skip mro_package_moved if the parent stash is renamed
This stops S_hv_delete_common from skipping the call to mro_package_moved if the HvNAME of the stash containing the deleted glob is no longer valid, but the stash is still attached to some other part of the symbol table.
Diffstat (limited to 't/mro')
-rw-r--r--t/mro/package_aliases.t19
1 files changed, 18 insertions, 1 deletions
diff --git a/t/mro/package_aliases.t b/t/mro/package_aliases.t
index f2c5c3944f..29c0a9593d 100644
--- a/t/mro/package_aliases.t
+++ b/t/mro/package_aliases.t
@@ -10,7 +10,7 @@ BEGIN {
use strict;
use warnings;
-plan(tests => 20);
+plan(tests => 21);
{
package New;
@@ -271,3 +271,20 @@ watchdog 3;
*foo:: = \%::;
*Acme::META::Acme:: = \*Acme::; # indirect self-reference
pass("mro_package_moved and self-referential packages");
+
+# Deleting a glob whose name does not indicate its location in the symbol
+# table but which nonetheless *is* in the symbol table.
+{
+ no strict refs=>;
+ no warnings;
+ @one::more::ISA = "four";
+ sub four::womp { "aoeaa" }
+ *two:: = *one::;
+ delete $::{"one::"};
+ @Childclass::ISA = 'two::more';
+ my $accum = 'Childclass'->womp . '-';
+ my $life_raft = delete ${"two::"}{"more::"};
+ $accum .= eval { 'Childclass'->womp } // '<undef>';
+ is $accum, 'aoeaa-<undef>',
+ 'Deleting globs whose loc in the symtab differs from gv_fullname'
+}