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;
10 $TODO = q{Mouse is not yet completed};
17 sub foo { 'Foo::foo(' . (inner() || '') . ')' };
18 sub bar { 'Foo::bar(' . (inner() || '') . ')' }
25 augment 'foo' => sub { 'Bar::foo' };
26 override 'bar' => sub { 'Bar::bar -> ' . super() };
33 override 'foo' => sub { 'Baz::foo -> ' . super() };
34 augment 'bar' => sub { 'Baz::bar' };
44 Let em clarify what is happening here. Baz::foo is calling
45 super(), which calls Bar::foo, which is an augmented sub
46 that calls Foo::foo, then calls inner() which actually
47 then calls Bar::foo. Confusing I know,.. but this is
48 *exactly* what is it supposed to do :)
53 'Baz::foo -> Foo::foo(Bar::foo)',
54 '... got the right value from mixed augment/override foo');
58 Allow me to clarify this one now ...
60 Since Baz::bar is an augment routine, it needs to find the
61 correct inner() to be called by. In this case it is Foo::bar.
62 However, Bar::bar is in-between us, so it should actually be
63 called first. Bar::bar is an overriden sub, and calls super()
64 which in turn then calls our Foo::bar, which calls inner(),
67 Confusing I know, but it is correct :)
72 'Bar::bar -> Foo::bar(Baz::bar)',
73 '... got the right value from mixed augment/override bar');