diff --git a/scripts/criteria b/scripts/criteria index bcc0e17..b1d75cf 100755 --- a/scripts/criteria +++ b/scripts/criteria @@ -42,7 +42,11 @@ use FindBin; use Getopt::Long; use lib "$FindBin::RealBin"; use criteria qw(new); -use JSON; + +use lib "$FindBin::RealBin/../lib"; +use lib "$FindBin::RealBin/../../../lib"; # path from 'support-scripts' + +use lcovutil; my $obj = criteria->new($0, @ARGV); @@ -54,7 +58,7 @@ if (!defined($obj) || return undef; } my $json = pop(@ARGV); -my $db = decode_json($json); +my $db = JsonSupport::decode($json); my ($status, $msgs) = $obj->check_criteria(@ARGV, $db); foreach my $m (@$msgs) { diff --git a/scripts/criteria.pm b/scripts/criteria.pm index 0474637..dc7088a 100644 --- a/scripts/criteria.pm +++ b/scripts/criteria.pm @@ -39,7 +39,6 @@ package criteria; use strict; -use JSON; use Getopt::Long qw(GetOptionsFromArray); our @ISA = qw(Exporter); diff --git a/scripts/threshold.pm b/scripts/threshold.pm index 3a1b233..793f403 100644 --- a/scripts/threshold.pm +++ b/scripts/threshold.pm @@ -48,7 +48,6 @@ package threshold; use strict; -use JSON; use Getopt::Long qw(GetOptionsFromArray); use Scalar::Util qw/looks_like_number/;