Skip to content

Commit

Permalink
Merge pull request #73 from karenetheridge/master
Browse files Browse the repository at this point in the history
change backend from JSON to JSON::MaybeXS
  • Loading branch information
genehack committed May 5, 2020
2 parents 68c0c17 + b44444c commit 2f49ae0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Changes file for {{$dist->name}}

{{$NEXT}}

* switch JSON backend to JSON::MaybeXS

1.337 2020-04-25 15:33:17-07:00 America/Los_Angeles

* Add 'readd' command to update repo entries in ~/.gitgot based on
Expand All @@ -12,7 +14,6 @@ Changes file for {{$dist->name}}
* switch from File::HomeDir to File::HomeDir::Tiny, for fewer
dependencies (Karen Etheridge) [#70]

>>>>>>> ether/ether/homedir
1.336 2018-04-13 15:38:00-07:00 America/Los_Angeles

* Add 'git-got' binary to allow running as `git got` (genehack)
Expand Down
6 changes: 3 additions & 3 deletions lib/App/GitGot/Command/list.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ sub _execute {
my( $self, $opt, $args ) = @_;

if ( $self->opt->json ) {
try_load_class( 'JSON' )
or die "json serializing requires the module 'JSON' to be installed\n";
try_load_class( 'JSON::MaybeXS' )
or die "json serializing requires the module 'JSON::MaybeXS' to be installed\n";

my @data = map { {%$_} } $self->active_repos;

say JSON::to_json( \@data, { pretty => 1 } );
say JSON::MaybeXS->new(pretty => 1)->encode( \@data );
return;
}

Expand Down

0 comments on commit 2f49ae0

Please sign in to comment.