forked from lix-project/hydra
JSON -> JSON::MaybeXS
This commit is contained in:
parent
30a7f068b7
commit
fc49a7129d
|
@ -1,7 +1,7 @@
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Setup;
|
use Setup;
|
||||||
use JSON qw(decode_json encode_json);
|
use JSON::MaybeXS qw(decode_json encode_json);
|
||||||
use File::Copy;
|
use File::Copy;
|
||||||
|
|
||||||
my %ctx = test_init(
|
my %ctx = test_init(
|
||||||
|
|
|
@ -2,7 +2,7 @@ use feature 'unicode_strings';
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Setup;
|
use Setup;
|
||||||
use JSON qw(decode_json encode_json);
|
use JSON::MaybeXS qw(decode_json encode_json);
|
||||||
|
|
||||||
my %ctx = test_init();
|
my %ctx = test_init();
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ use feature 'unicode_strings';
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Setup;
|
use Setup;
|
||||||
use JSON qw(decode_json encode_json);
|
use JSON::MaybeXS qw(decode_json encode_json);
|
||||||
|
|
||||||
my %ctx = test_init();
|
my %ctx = test_init();
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ use feature 'unicode_strings';
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Setup;
|
use Setup;
|
||||||
use JSON qw(decode_json encode_json);
|
use JSON::MaybeXS qw(decode_json encode_json);
|
||||||
|
|
||||||
my %ctx = test_init();
|
my %ctx = test_init();
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ use feature 'unicode_strings';
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Setup;
|
use Setup;
|
||||||
use JSON qw(decode_json encode_json);
|
use JSON::MaybeXS qw(decode_json encode_json);
|
||||||
|
|
||||||
my %ctx = test_init();
|
my %ctx = test_init();
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Setup;
|
use Setup;
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use JSON qw(decode_json);
|
use JSON::MaybeXS qw(decode_json);
|
||||||
my %ctx = test_init(
|
my %ctx = test_init(
|
||||||
# Without this, the test will fail because a `file:` store is not treated as a
|
# 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
|
# local store by `isLocalStore` in src/lib/Hydra/Helper/Nix.pm, and any
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use feature 'unicode_strings';
|
use feature 'unicode_strings';
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use JSON;
|
use JSON::MaybeXS;
|
||||||
use Setup;
|
use Setup;
|
||||||
|
|
||||||
my %ctx = test_init(
|
my %ctx = test_init(
|
||||||
|
@ -42,7 +42,7 @@ my $dat = do {
|
||||||
open(my $json_fh, "<", $filename)
|
open(my $json_fh, "<", $filename)
|
||||||
or die("Can't open \"$filename\": $!\n");
|
or die("Can't open \"$filename\": $!\n");
|
||||||
local $/;
|
local $/;
|
||||||
my $json = JSON->new;
|
my $json = JSON::MaybeXS->new;
|
||||||
$json->decode(<$json_fh>)
|
$json->decode(<$json_fh>)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue