Commit | Line | Data |
---|---|---|
204e6232 BF |
1 | #!/usr/bin/perl |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | use utf8; | |
6 | use open qw( :utf8 :std ); | |
7 | require q(./test.pl); plan(tests => 4); | |
8 | ||
9 | use mro; | |
10 | ||
11 | { | |
12 | package PṞoxᚤ; | |
13 | our @ISA = qw//; | |
14 | sub next_prxᔬ { goto &next::method } | |
15 | sub maybe_prxᔬ { goto &maybe::next::method } | |
16 | sub can_prxᔬ { goto &next::can } | |
17 | ||
18 | package Ⱦ밧ᶟ; | |
19 | our @ISA = qw//; | |
20 | sub ᕗ { 42 } | |
21 | sub Ƚ { 24 } | |
22 | # বẔ doesn't exist intentionally | |
23 | sub ʠঊₓ { 242 } | |
24 | ||
25 | package ᵗ톺; | |
26 | our @ISA = qw/Ⱦ밧ᶟ/; | |
27 | sub ᕗ { shift->PṞoxᚤ::next_prxᔬ() } | |
28 | sub Ƚ { shift->PṞoxᚤ::maybe_prxᔬ() } | |
29 | sub বẔ { shift->PṞoxᚤ::maybe_prxᔬ() } | |
30 | sub ʠঊₓ { shift->PṞoxᚤ::can_prxᔬ()->() } | |
31 | } | |
32 | ||
33 | is(ᵗ톺->ᕗ, 42, 'proxy next::method via goto'); | |
34 | is(ᵗ톺->Ƚ, 24, 'proxy maybe::next::method via goto'); | |
35 | ok(!ᵗ톺->বẔ, 'proxy maybe::next::method via goto with no method'); | |
36 | is(ᵗ톺->ʠঊₓ, 242, 'proxy next::can via goto'); |