6 use Test::More tests => 9;
19 sub new { bless {}, $_[0] }
20 sub bar { 'Foo::bar' }
23 # call the submethod in the direct instance
29 is($foo->bar(), 'Foo::bar', '... got the right return value');
31 # fail calling it from a subclass
43 my $m = sub { (shift)->next::method() };
44 subname('Bar::bar', $m);
55 my $value = eval { $bar->bar() };
56 ok(!$@, '... calling bar() succedded') || diag $@;
57 is($value, 'Foo::bar', '... got the right return value too');