package
Jopa;
use
Test::More;
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);