6 use Test::More tests => 15;
12 This just tests the interaction of override/super
13 with non-Mouse superclasses. It really should not
14 cause issues, the only thing it does is to create
15 a metaclass for Foo so that it can find the right
18 This may end up being a sensitive issue for some
19 non-Mouse classes, but in 99% of the cases it
29 sub new { bless {} => shift() }
31 sub foo { 'Foo::foo' }
32 sub bar { 'Foo::bar' }
33 sub baz { 'Foo::baz' }
40 override bar => sub { 'Bar::bar -> ' . super() };
47 override bar => sub { 'Baz::bar -> ' . super() };
48 override baz => sub { 'Baz::baz -> ' . super() };
56 is($baz->foo(), 'Foo::foo', '... got the right value from &foo');
57 is($baz->bar(), 'Baz::bar -> Bar::bar -> Foo::bar', '... got the right value from &bar');
58 is($baz->baz(), 'Baz::baz -> Foo::baz', '... got the right value from &baz');
64 is($bar->foo(), 'Foo::foo', '... got the right value from &foo');
65 is($bar->bar(), 'Bar::bar -> Foo::bar', '... got the right value from &bar');
66 is($bar->baz(), 'Foo::baz', '... got the right value from &baz');
71 is($foo->foo(), 'Foo::foo', '... got the right value from &foo');
72 is($foo->bar(), 'Foo::bar', '... got the right value from &bar');
73 is($foo->baz(), 'Foo::baz', '... got the right value from &baz');