blob: 452d1dbdc31088afa23190ffd902e2ffe5b22784 (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
#!./perl
use strict;
use warnings;
use utf8;
use open qw( :utf8 :std );
require q(./test.pl); plan(tests => 2);
=pod
This tests a strange bug found by Matt S. Trout
while building DBIx::Class. Thanks Matt!!!!
<A>
/ \
<C> <B>
\ /
<D>
=cut
{
package Diᚪၚd_A;
use mro 'dfs';
sub ᕘ { 'Diᚪၚd_A::ᕘ' }
}
{
package Diᚪၚd_B;
use base 'Diᚪၚd_A';
use mro 'dfs';
sub ᕘ { 'Diᚪၚd_B::ᕘ => ' . (shift)->SUPER::ᕘ }
}
{
package Diᚪၚd_C;
use mro 'dfs';
use base 'Diᚪၚd_A';
}
{
package Diᚪၚd_D;
use base ('Diᚪၚd_C', 'Diᚪၚd_B');
use mro 'dfs';
sub ᕘ { 'Diᚪၚd_D::ᕘ => ' . (shift)->SUPER::ᕘ }
}
ok(eq_array(
mro::get_linear_isa('Diᚪၚd_D'),
[ qw(Diᚪၚd_D Diᚪၚd_C Diᚪၚd_A Diᚪၚd_B) ]
), '... got the right MRO for Diᚪၚd_D');
is(Diᚪၚd_D->ᕘ,
'Diᚪၚd_D::ᕘ => Diᚪၚd_A::ᕘ',
'... got the right next::method dispatch path');
|