9 set_up_inc('../lib', 'lib');
13 use open qw( :utf8 :std );
24 sub new { bless {}, $_[0] }
28 # call the submethod in the direct instance
34 is($foo->ƚ(), 'ᕘ::ƚ', '... got the right return value');
36 # fail calling it from a subclass
47 object_ok($bar, 'Baɾ');
50 # test it working with with Sub::Name
53 skip("Sub::Name is required for this test", 3) if $@;
55 my $m = sub { (shift)->next::method() };
56 Sub::Name::subname('Baɾ::ƚ', $m);
63 my $value = eval { $bar->ƚ() };
64 ok(!$@, '... calling ƚ() succeeded') || diag $@;
65 is($value, 'ᕘ::ƚ', '... got the right return value too');
68 # test it failing without Sub::Name
78 object_ok($baz, 'બʑ');
82 my $m = sub { (shift)->next::method() };
89 ok($@, '... calling ƚ() with next::method failed') || diag $@;
92 # Test with non-existing class (used to segfault)
96 sub fਓ { No::Such::Class->next::can }
100 is($@, '', "->next::can on non-existing package name");