11 This just tests the interaction of override/super
12 with non-Moose superclasses. It really should not
13 cause issues, the only thing it does is to create
14 a metaclass for Foo so that it can find the right
17 This may end up being a sensitive issue for some
18 non-Moose classes, but in 99% of the cases it
28 sub new { bless {} => shift() }
30 sub foo { 'Foo::foo' }
31 sub bar { 'Foo::bar' }
32 sub baz { 'Foo::baz' }
39 override bar => sub { 'Bar::bar -> ' . super() };
46 override bar => sub { 'Baz::bar -> ' . super() };
47 override baz => sub { 'Baz::baz -> ' . super() };
55 is($baz->foo(), 'Foo::foo', '... got the right value from &foo');
56 is($baz->bar(), 'Baz::bar -> Bar::bar -> Foo::bar', '... got the right value from &bar');
57 is($baz->baz(), 'Baz::baz -> Foo::baz', '... got the right value from &baz');
63 is($bar->foo(), 'Foo::foo', '... got the right value from &foo');
64 is($bar->bar(), 'Bar::bar -> Foo::bar', '... got the right value from &bar');
65 is($bar->baz(), 'Foo::baz', '... got the right value from &baz');
70 is($foo->foo(), 'Foo::foo', '... got the right value from &foo');
71 is($foo->bar(), 'Foo::bar', '... got the right value from &bar');
72 is($foo->baz(), 'Foo::baz', '... got the right value from &baz');