JSON -> JSON::MaybeXS

This commit is contained in:
Graham Christensen 2021-12-13 16:36:26 -05:00
parent 30a7f068b7
commit fc49a7129d
7 changed files with 8 additions and 8 deletions

View file

@ -1,7 +1,7 @@
use strict;
use warnings;
use Setup;
use JSON qw(decode_json encode_json);
use JSON::MaybeXS qw(decode_json encode_json);
use File::Copy;
my %ctx = test_init(

View file

@ -2,7 +2,7 @@ use feature 'unicode_strings';
use strict;
use warnings;
use Setup;
use JSON qw(decode_json encode_json);
use JSON::MaybeXS qw(decode_json encode_json);
my %ctx = test_init();

View file

@ -2,7 +2,7 @@ use feature 'unicode_strings';
use strict;
use warnings;
use Setup;
use JSON qw(decode_json encode_json);
use JSON::MaybeXS qw(decode_json encode_json);
my %ctx = test_init();

View file

@ -2,7 +2,7 @@ use feature 'unicode_strings';
use strict;
use warnings;
use Setup;
use JSON qw(decode_json encode_json);
use JSON::MaybeXS qw(decode_json encode_json);
my %ctx = test_init();

View file

@ -2,7 +2,7 @@ use feature 'unicode_strings';
use strict;
use warnings;
use Setup;
use JSON qw(decode_json encode_json);
use JSON::MaybeXS qw(decode_json encode_json);
my %ctx = test_init();

View file

@ -2,7 +2,7 @@ use strict;
use warnings;
use Setup;
use Data::Dumper;
use JSON qw(decode_json);
use JSON::MaybeXS qw(decode_json);
my %ctx = test_init(
# Without this, the test will fail because a `file:` store is not treated as a
# local store by `isLocalStore` in src/lib/Hydra/Helper/Nix.pm, and any

View file

@ -1,7 +1,7 @@
use feature 'unicode_strings';
use strict;
use warnings;
use JSON;
use JSON::MaybeXS;
use Setup;
my %ctx = test_init(
@ -42,7 +42,7 @@ my $dat = do {
open(my $json_fh, "<", $filename)
or die("Can't open \"$filename\": $!\n");
local $/;
my $json = JSON->new;
my $json = JSON::MaybeXS->new;
$json->decode(<$json_fh>)
};