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