Skip to content

Commit 5532b9a

Browse files
committed
Use JSON::PP for releases.json snippets as it is in core since 5.14
We can later switch to JSON::MaybeXS if we need XS speed.
1 parent 429db3e commit 5532b9a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Build.PL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ my $builder = $class->new(
5555
'HTML::Entities' => 0,
5656
'IO::Capture' => 0,
5757
'IPC::Run3' => 0,
58-
'JSON' => 0,
58+
'JSON::PP' => 0,
5959
'LWP::UserAgent' => 0,
6060
'Pod::Usage' => 0,
6161
'Portable::Dist' => '1.06',

lib/Perl/Dist/Strawberry/Step/OutputReleasesJSONSnippet.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use warnings;
55
use base 'Perl::Dist::Strawberry::Step';
66

77
use Time::Piece;
8-
use JSON;
8+
use JSON::PP;
99

1010
use File::Spec::Functions qw(catfile);
1111

@@ -87,7 +87,7 @@ sub run {
8787
};
8888

8989
#p $snippet;
90-
my $json_snippet = JSON->new->utf8->pretty->canonical->encode($snippet);
90+
my $json_snippet = JSON::PP->new->utf8->pretty->canonical->encode($snippet);
9191
open my $fh, '>', $json_file or die "Unable to open $json_file, $!";
9292
print {$fh} $json_snippet;
9393
$fh->close;

0 commit comments

Comments
 (0)