summaryrefslogtreecommitdiff
path: root/t/mro/basic.t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-09-01 14:47:38 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-09-01 14:47:38 -0700
commit3df5c4b513c5e5c2f25d831f556f2a1c5693ce98 (patch)
treedf8369277985791b3c6d12df55c52c32bcb95b1d /t/mro/basic.t
parentcbf45e8454c586302a9f324433b3155521872636 (diff)
downloadperl-3df5c4b513c5e5c2f25d831f556f2a1c5693ce98.tar.gz
Teach mro code about null array elements
This is part of ticket #119433. Commit ce0d49f changed AVs to use NULL for nonexistent elements. The mro lookup code was not accounting for that, causing Class::Contract’s tests to crash (and perhaps other modules, too).
Diffstat (limited to 't/mro/basic.t')
-rw-r--r--t/mro/basic.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/mro/basic.t b/t/mro/basic.t
index 65090732f7..5625b5190e 100644
--- a/t/mro/basic.t
+++ b/t/mro/basic.t
@@ -8,7 +8,7 @@ BEGIN {
@INC = '../lib';
require q(./test.pl);
}
-plan(tests => 60);
+plan(tests => 61);
require mro;
@@ -389,3 +389,9 @@ undef $x; # should use the new DESTROY
is $destroy_output, "new",
'Changes to UNIVERSAL::DESTROY invalidate DESTROY caches';
undef *UNIVERSAL::DESTROY;
+
+{
+ no warnings 'uninitialized';
+ $#_119433::ISA++;
+ pass "no crash when ISA contains nonexistent elements";
+}