diff options
author | Norbert Preining <preining@logic.at> | 2017-10-15 00:47:23 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2017-10-15 00:47:23 +0000 |
commit | dc82862df05cc9db02ef403288acb689d4578651 (patch) | |
tree | b42a6f0dcaad2316c187fde2ccbd7707131a3b34 /Master/tlpkg | |
parent | 3d992315224b02439b839e29204a9090fc42f6b4 (diff) |
add install/available keys to JSON output, deal with unavailable packages
git-svn-id: svn://tug.org/texlive/trunk@45543 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPOBJ.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index 3e603bc99a3..95c5adeffbf 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -422,6 +422,7 @@ sub writeout_simple { sub as_json { my $self = shift; + my %addargs = @_; require JSON; #my $json = JSON::PP->new->utf8; my %foo = %{$self}; @@ -441,6 +442,10 @@ sub as_json { $foo{'relocated'} = $JSON::false; } } + # set the additional args + for my $k (keys %addargs) { + $foo{$k} = $addargs{$k}; + } my $utf8_encoded_json_text = JSON::encode_json(\%foo); # $json->encode(\%foo); return $utf8_encoded_json_text; } |