From: Mischa POSLAWSKY Date: Wed, 26 Apr 2017 21:16:50 +0000 (+0200) Subject: browser: force perl decode of caniuse json X-Git-Tag: v1.10~67 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/7879a9d9fffa69855451086e28f42f2a0a38cb38 browser: force perl decode of caniuse json Avoid XS version if installed to prevent boolean references. --- diff --git a/tools/mkcaniuse b/tools/mkcaniuse index 53cd904..07531d4 100755 --- a/tools/mkcaniuse +++ b/tools/mkcaniuse @@ -3,11 +3,11 @@ use 5.014; use warnings; use Data::Dump 'pp'; -use JSON; +use JSON::PP; use File::stat; use Time::Piece; -our $VERSION = '1.01'; +our $VERSION = '1.02'; local $/; # slurp my $source = readline; @@ -15,7 +15,7 @@ my $source = readline; $JSON::PP::false = 0; $JSON::PP::true = 1; -my $data = from_json($source); +my $data = decode_json($source); my $update = eval { stat(${^LAST_FH} // $ARGV)->mtime } or warn "Could not determine input time\n"; $data->{-date} = Time::Piece->new($update)->datetime;