use warnings;
use Test::More;
+use Test::TempDir;
+use File::Spec::Functions;
+my $dir = tempdir;
BEGIN {
eval "use IO::AtomicFile";
- plan skip_all => "IO::AtomicFile is required for this test" if $@;
+ plan skip_all => "IO::AtomicFile is required for this test" if $@;
+ eval "use JSON::Any";
+ plan skip_all => "JSON::Any is required for this test" if $@;
# NOTE:
# this is because JSON::XS is
# the only one which really gets
);
}
-my $file = 'temp.json';
+my $file = catfile($dir, 'temp.json');
{
my $foo = Foo->new;
'... got the string we expected');
}
-unlink $file;