summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-06-29 09:00:32 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-06-29 09:00:32 +0000
commit0fa56319bf436f5bc52860b8491e91269fb41056 (patch)
tree6ce2bf3a62522458b139993cedfffb934e42daf3 /t
parentfdef73f9d3c637571d3ab9a9d73990f87b1ad2d9 (diff)
downloadperl-0fa56319bf436f5bc52860b8491e91269fb41056.tar.gz
Revert change #31489.
That change was adding a hook to cope with the case when one was undef'ining *ISA globs, in order to clean up correctly. However, this broke the case where one was assiging an array ref to @ISA, which is likely to be more common. Conclusion: don't undef *ISA. (or more generally don't undef globs that contain magical variables) p4raw-link: @31489 on //depot/perl: 5be5c7a687aa37f2ea9dec7988eb57cad1f1ec24 p4raw-id: //depot/perl@31502
Diffstat (limited to 't')
-rw-r--r--t/mro/basic.t43
1 files changed, 1 insertions, 42 deletions
diff --git a/t/mro/basic.t b/t/mro/basic.t
index be7e3ddec0..e6792751ee 100644
--- a/t/mro/basic.t
+++ b/t/mro/basic.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-require q(./test.pl); plan(tests => 27);
+require q(./test.pl); plan(tests => 21);
{
package MRO_A;
@@ -147,44 +147,3 @@ is(eval { MRO_N->testfunc() }, 123);
undef @ISACLEAR::ISA;
ok(eq_array(mro::get_linear_isa('ISACLEAR'),[qw/ISACLEAR/]));
}
-
-{
- {
- package ISACLEAR2;
- our @ISA = qw/XX YY ZZ/;
- }
-
- # baseline
- ok(eq_array(mro::get_linear_isa('ISACLEAR2'),[qw/ISACLEAR2 XX YY ZZ/]));
-
- # delete @ISA
- delete $ISACLEAR2::{ISA};
- ok(eq_array(mro::get_linear_isa('ISACLEAR2'),[qw/ISACLEAR2/]));
-}
-
-# another destructive test, undef the ISA glob
-{
- {
- package ISACLEAR3;
- our @ISA = qw/XX YY ZZ/;
- }
- # baseline
- ok(eq_array(mro::get_linear_isa('ISACLEAR3'),[qw/ISACLEAR3 XX YY ZZ/]));
-
- undef *ISACLEAR3::ISA;
- ok(eq_array(mro::get_linear_isa('ISACLEAR3'),[qw/ISACLEAR3/]));
-}
-
-# This is how Class::Inner does it
-{
- {
- package ISACLEAR4;
- our @ISA = qw/XX YY ZZ/;
- }
- # baseline
- ok(eq_array(mro::get_linear_isa('ISACLEAR4'),[qw/ISACLEAR4 XX YY ZZ/]));
-
- delete $ISACLEAR4::{ISA};
- delete $::{ISACLEAR4::};
- ok(eq_array(mro::get_linear_isa('ISACLEAR4'),[qw/ISACLEAR4/]));
-}