6 require q(./test.pl); plan(tests => 4);
10 This tests the classic diamond inheritence pattern.
22 sub hello { 'Diamond_A::hello' }
32 sub hello { 'Diamond_C::hello' }
36 use base ('Diamond_B', 'Diamond_C');
41 mro::get_linear_isa('Diamond_D'),
42 [ qw(Diamond_D Diamond_B Diamond_A Diamond_C) ]
43 ), '... got the right MRO for Diamond_D');
45 is(Diamond_D->hello, 'Diamond_A::hello', '... method resolved itself as expected');
46 is(Diamond_D->can('hello')->(), 'Diamond_A::hello', '... can(method) resolved itself as expected');
47 is(UNIVERSAL::can("Diamond_D", 'hello')->(), 'Diamond_A::hello', '... can(method) resolved itself as expected');