6 use Test::More tests => 16;
14 This just tests the interaction of override/super
15 with non-Moose superclasses. It really should not
16 cause issues, the only thing it does is to create
17 a metaclass for Foo so that it can find the right
20 This may end up being a sensitive issue for some
21 non-Moose classes, but in 99% of the cases it
31 sub new { bless {} => shift() }
33 sub foo { 'Foo::foo' }
34 sub bar { 'Foo::bar' }
35 sub baz { 'Foo::baz' }
44 override bar => sub { 'Bar::bar -> ' . super() };
53 override bar => sub { 'Baz::bar -> ' . super() };
54 override baz => sub { 'Baz::baz -> ' . super() };
62 is($baz->foo(), 'Foo::foo', '... got the right value from &foo');
63 is($baz->bar(), 'Baz::bar -> Bar::bar -> Foo::bar', '... got the right value from &bar');
64 is($baz->baz(), 'Baz::baz -> Foo::baz', '... got the right value from &baz');
70 is($bar->foo(), 'Foo::foo', '... got the right value from &foo');
71 is($bar->bar(), 'Bar::bar -> Foo::bar', '... got the right value from &bar');
72 is($bar->baz(), 'Foo::baz', '... got the right value from &baz');
77 is($foo->foo(), 'Foo::foo', '... got the right value from &foo');
78 is($foo->bar(), 'Foo::bar', '... got the right value from &bar');
79 is($foo->baz(), 'Foo::baz', '... got the right value from &baz');