blob: be3fe060fc28e8894be18007ba32d630758dad11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!perl
use strict;
use warnings;
use Test::More tests => 3;
{
package A;
}
@B::ISA = 'A';
@C::ISA = 'A';
@D::ISA = qw(B C);
eval {mro::set_mro('D', 'c3')};
like $@, qr/Invalid mro name: 'c3'/;
require mro;
is_deeply(mro::get_linear_isa('D'), [qw(D B A C)], 'still dfs MRO');
mro::set_mro('D', 'c3');
is_deeply(mro::get_linear_isa('D'), [qw(D B C A)], 'c3 MRO');
|