12 use Test::More tests => 4;
16 This tests the classic diamond inheritence pattern.
28 sub hello { 'Diamond_A::hello' }
38 sub hello { 'Diamond_C::hello' }
42 use base ('Diamond_B', 'Diamond_C');
47 mro::get_linear_isa('Diamond_D'),
48 [ qw(Diamond_D Diamond_B Diamond_C Diamond_A) ],
49 '... got the right MRO for Diamond_D');
51 is(Diamond_D->hello, 'Diamond_C::hello', '... method resolved itself as expected');
52 is(Diamond_D->can('hello')->(), 'Diamond_C::hello', '... can(method) resolved itself as expected');
53 is(UNIVERSAL::can("Diamond_D", 'hello')->(), 'Diamond_C::hello', '... can(method) resolved itself as expected');