browser: force perl decode of caniuse json
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 26 Apr 2017 21:16:50 +0000 (23:16 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 29 May 2017 16:51:17 +0000 (18:51 +0200)
Avoid XS version if installed to prevent boolean references.

tools/mkcaniuse

index 53cd9047ecff037ce304e4272d5e63f0bca5cc5e..07531d48c019b03b3411ccab9026b8c743444144 100755 (executable)
@@ -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;