use warnings;
use Test::More;
+use File::Temp qw(tempdir);
+use File::Spec::Functions;
+my $dir = tempdir;
+
+use Test::Requires {
+ 'JSON::Any' => 0.01, # skip all if not installed
+ 'IO::AtomicFile' => 0.01,
+};
BEGIN {
# NOTE:
# the only one which really gets
# utf8 correct
# - SL
- BEGIN {
+ BEGIN {
$ENV{JSON_ANY_ORDER} = qw(XS);
- $ENV{JSON_ANY_CONFIG} = "utf8=1";
- }
+ $ENV{JSON_ANY_CONFIG} = "utf8=0,canonical=1";
+ }
plan tests => 8;
use_ok('MooseX::Storage');
}
);
}
-my $file = 'temp.json';
+my $file = catfile($dir, 'temp.json');
{
my $foo = Foo->new;
'... got the string we expected');
}
-unlink $file;