10 # this is because JSON::XS is
11 # the only one which really gets
15 $ENV{JSON_ANY_ORDER} = qw(XS);
16 $ENV{JSON_ANY_CONFIG} = "utf8=1";
19 use_ok('MooseX::Storage');
29 with Storage( 'format' => 'JSON', 'io' => 'File' );
31 has 'utf8_string' => (
34 default => sub { "ネットスーパー (Internet Shopping)" }
38 my $file = 'temp.json';
42 isa_ok( $foo, 'Foo' );
48 my $foo = Foo->load($file);
52 "ネットスーパー (Internet Shopping)",
53 '... got the string we expected');
62 utf8_string => 'Escritório'
64 isa_ok( $foo, 'Foo' );
70 my $foo = Foo->load($file);
73 ok(utf8::is_utf8($foo->utf8_string), '... the string is still utf8');
77 '... got the string we expected');