Skip to content

Commit 8b31052

Browse files
authored
Remove explicit JSON dependency in favor of ordered preference list. (#374)
Addresses #372 Signed-off-by: Henry Cox <[email protected]>
1 parent 3cd2210 commit 8b31052

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

scripts/criteria

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ use FindBin;
4242
use Getopt::Long;
4343
use lib "$FindBin::RealBin";
4444
use criteria qw(new);
45-
use JSON;
45+
46+
use lib "$FindBin::RealBin/../lib";
47+
use lib "$FindBin::RealBin/../../../lib"; # path from 'support-scripts'
48+
49+
use lcovutil;
4650

4751
my $obj = criteria->new($0, @ARGV);
4852

@@ -54,7 +58,7 @@ if (!defined($obj) ||
5458
return undef;
5559
}
5660
my $json = pop(@ARGV);
57-
my $db = decode_json($json);
61+
my $db = JsonSupport::decode($json);
5862

5963
my ($status, $msgs) = $obj->check_criteria(@ARGV, $db);
6064
foreach my $m (@$msgs) {

scripts/criteria.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
package criteria;
4040

4141
use strict;
42-
use JSON;
4342
use Getopt::Long qw(GetOptionsFromArray);
4443

4544
our @ISA = qw(Exporter);

scripts/threshold.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
package threshold;
4949

5050
use strict;
51-
use JSON;
5251
use Getopt::Long qw(GetOptionsFromArray);
5352
use Scalar::Util qw/looks_like_number/;
5453

0 commit comments

Comments
 (0)