From 9fdb790af227473fc9d01416254aeb9d82df47ce Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 12 Feb 2015 06:17:43 +0100 Subject: [PATCH] browser: flatten json booleans in caniuse perl include Newer versions of JSON return blessed objects for true/false which are unneeded and result in unreadable Data::Dump::pp output. --- tools/mkcaniuse | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/mkcaniuse b/tools/mkcaniuse index eaadead..de3d789 100755 --- a/tools/mkcaniuse +++ b/tools/mkcaniuse @@ -13,12 +13,16 @@ our $VERSION = '1.01'; local $/; # slurp my $source = readline; +$JSON::PP::false = 0; +$JSON::PP::true = 1; + my $data = from_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; -print pp($data); +say "# automatically generated by $0"; +print '+', pp($data); __END__ -- 2.30.0