The Perl Toolchain Summit 2025 Needs You: You can help ๐Ÿ™ Learn more

package Jopa;
use Test::More ($] >= 5.016) ? (skip_all => 'utf8 support on this perl is not broken') : (no_plan);
use utf8;
my $broken_utf8_subs = ($] < 5.016); #see perl5160delta
my $utf8_key = "ั†";
my $nonutf_key = "ั†";
utf8::encode($nonutf_key);
my $utf8_acc = "ั‚ะตัั‚";
my $nonutf_acc = "ั‚ะตัั‚";
utf8::encode($nonutf_acc);
__PACKAGE__->mk_inherited_accessors([$utf8_acc, $utf8_key], [$nonutf_acc, $nonutf_key]);
is(Jopa->ั‚ะตัั‚, undef);
Jopa->ั‚ะตัั‚(42);
is(Jopa->ั‚ะตัั‚, 42);
is(Jopa->$utf8_acc, 42);
is(Jopa->$nonutf_acc, 42);