Skip to content

Commit f38c765

Browse files
committed
use Cpanel::JSON::XS everywhere
1 parent bdd23aa commit f38c765

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

cpanfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ requires 'HTTP::Request::Common';
4141
requires 'IO::Async::Loop';
4242
requires 'IO::Async::SSL';
4343
requires 'IO::Socket::SSL';
44-
requires 'JSON::MaybeXS' => '1.004000';
4544
requires 'List::Util', '1.45';
4645
requires 'Locale::Country','3.62';
4746
requires 'Log::Dispatch';

lib/MetaCPAN/Middleware/Static.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use Plack::Builder qw( builder enable mount );
55
use Plack::App::File ();
66
use Cwd qw( cwd );
77
use Plack::MIME ();
8-
use JSON::MaybeXS ();
8+
use Cpanel::JSON::XS ();
99

1010
Plack::MIME->add_type(
1111
'.eot' => 'application/vnd.ms-fontobject',
@@ -34,7 +34,7 @@ sub wrap {
3434
or die "can't find asset map";
3535
my $json = do { local $/; <$fh> };
3636
close $fh;
37-
my $files = JSON::MaybeXS->new->decode($json);
37+
my $files = Cpanel::JSON::XS->new->decode($json);
3838
return [ map "/assets/$_", @$files ];
3939
};
4040

lib/MetaCPAN/Web/Controller/Account.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use Moose;
55
BEGIN { extends 'MetaCPAN::Web::Controller' }
66

77
use MetaCPAN::Web::RenderUtil ();
8-
use JSON::MaybeXS ();
8+
use Cpanel::JSON::XS ();
99

1010
sub auto : Private {
1111
my ( $self, $c ) = @_;
@@ -36,7 +36,7 @@ sub login_status : Local : Args(0) : Auth(0) {
3636
my $output = $c->{stash}{json} ||= {};
3737

3838
if ( my $user = $c->user ) {
39-
$output->{logged_in} = JSON::MaybeXS::true;
39+
$output->{logged_in} = Cpanel::JSON::XS::true;
4040
if ( my $pause_id = $user->pause_id ) {
4141

4242
# this is not a complete author record, but enough for now
@@ -62,7 +62,7 @@ sub login_status : Local : Args(0) : Auth(0) {
6262
$c->forward('/account/favorite/list_as_json');
6363
}
6464
else {
65-
$c->stash->{json}{logged_in} = JSON::MaybeXS::false;
65+
$c->stash->{json}{logged_in} = Cpanel::JSON::XS::false;
6666
$c->cdn_max_age('30d');
6767
}
6868
}

0 commit comments

Comments
 (0)