+
+# clearing @ISA in different ways
+# some are destructive to the package, hence the new
+# package name each time
+{
+ no warnings 'uninitialized';
+ {
+ package ISACLEAR;
+ our @ISA = qw/XX YY ZZ/;
+ }
+ # baseline
+ ok(eq_array(mro::get_linear_isa('ISACLEAR'),[qw/ISACLEAR XX YY ZZ/]));
+
+ # this looks dumb, but it preserves existing behavior for compatibility
+ # (undefined @ISA elements treated as "main")
+ $ISACLEAR::ISA[1] = undef;
+ ok(eq_array(mro::get_linear_isa('ISACLEAR'),[qw/ISACLEAR XX main ZZ/]));
+
+ # undef the array itself
+ undef @ISACLEAR::ISA;
+ ok(eq_array(mro::get_linear_isa('ISACLEAR'),[qw/ISACLEAR/]));
+}