10 plan skip_all => "NEXT required for this test" if $@;
20 sub foo { 'Foo::foo' }
28 sub foo { 'Fuz::foo => ' . (shift)->next::method }
36 sub foo { 'Bar::foo => ' . (shift)->next::method }
42 require NEXT; # load this as late as possible so we can catch the test skip
44 use base 'Bar', 'Fuz';
46 sub foo { 'Baz::foo => ' . (shift)->NEXT::foo }
49 Class::C3::initialize();
51 is(Foo->foo, 'Foo::foo', '... got the right value from Foo->foo');
52 is(Fuz->foo, 'Fuz::foo => Foo::foo', '... got the right value from Fuz->foo');
53 is(Bar->foo, 'Bar::foo => Foo::foo', '... got the right value from Bar->foo');
55 is(Baz->foo, 'Baz::foo => Bar::foo => Fuz::foo => Foo::foo', '... got the right value using NEXT in a subclass of a C3 class');