use strict;
no warnings 'once';
-plan(tests => 82);
+plan(tests => 83);
@A::ISA = 'B';
@B::ISA = 'C';
is(A->d, "B::d2"); # Update hash table;
# What follows is hardly guarantied to work, since the names in scripts
-# are already linked to "pruned" globs. Say, `undef &B::d' if it were
-# after `delete $B::{d}; sub B::d {}' would reach an old subroutine.
+# are already linked to "pruned" globs. Say, 'undef &B::d' if it were
+# after 'delete $B::{d}; sub B::d {}' would reach an old subroutine.
undef &B::d;
delete $B::{d};
like(NulTest->${ \"nul\0test" }, "nul\0test", "AUTOLOAD is nul-clean");
}
+
+
+{
+ fresh_perl_is(
+ q! sub T::DESTROY { $x = $_[0]; } bless [], "T";!,
+ "DESTROY created new reference to dead object 'T' during global destruction.",
+ {},
+ "DESTROY creating a new reference to the object generates a warning."
+ );
+}