Skip to content

Commit

Permalink
Write the values directly
Browse files Browse the repository at this point in the history
Makes the code a bit shorter.
  • Loading branch information
AlexDaniel committed Jun 14, 2020
1 parent 7d81839 commit 5973a34
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions bin/blin.p6
Expand Up @@ -445,15 +445,13 @@ note ‘🥞🥞 Saving the json output’;
{
my %json-data;
for @modules {
my $status = .done ?? .done.result !! Unknown;
my $output = .output-new;
my $name = .name;
my $status = .done ?? .done.result !! Unknown;
my $name = .name;
# TODO uhh, there can be more than one entry with the same name…
# … whatever…
my $version = .version;
%json-data{$name}<version> = ~$version;
%json-data{$name}<status> = ~$status;
%json-data{$name}<output> = $output;
%json-data{$name}<version> = ~.version;
%json-data{$name}<status> = ~$status;
%json-data{$name}<output> = .output;
}
use JSON::Fast;
spurt $json-path, to-json %json-data;
Expand Down

0 comments on commit 5973a34

Please sign in to comment.