2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
14 This just tests the interaction of override/super
15 with non-Mouse 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-Mouse 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' }
42 override bar => sub { 'Bar::bar -> ' . super() };
49 override bar => sub { 'Baz::bar -> ' . super() };
50 override baz => sub { 'Baz::baz -> ' . super() };
58 is($baz->foo(), 'Foo::foo', '... got the right value from &foo');
59 is($baz->bar(), 'Baz::bar -> Bar::bar -> Foo::bar', '... got the right value from &bar');
60 is($baz->baz(), 'Baz::baz -> Foo::baz', '... got the right value from &baz');
66 is($bar->foo(), 'Foo::foo', '... got the right value from &foo');
67 is($bar->bar(), 'Bar::bar -> Foo::bar', '... got the right value from &bar');
68 is($bar->baz(), 'Foo::baz', '... got the right value from &baz');
73 is($foo->foo(), 'Foo::foo', '... got the right value from &foo');
74 is($foo->bar(), 'Foo::bar', '... got the right value from &bar');
75 is($foo->baz(), 'Foo::baz', '... got the right value from &baz');