diff options
author | Dan Book <grinnz@grinnz.com> | 2020-02-24 11:27:29 -0500 |
---|---|---|
committer | Aran Clary Deltac <bluefeet@gmail.com> | 2023-06-07 13:15:52 -0700 |
commit | dc1afe207ab3fc46ead31ca60003a326ec2f339a (patch) | |
tree | b39dc26ce43d39758c4bcdb8b42d42a2a81694ad | |
parent | 02a2862cba323fe37e10afba8183d14847866fd2 (diff) |
use JSON::MaybeXS instead of JSON
-rw-r--r-- | cpanfile | 2 | ||||
-rw-r--r-- | lib/GitLab/API/v4/Config.pm | 2 | ||||
-rwxr-xr-x | lib/GitLab/API/v4/Mock/RESTClient.pm | 2 | ||||
-rw-r--r-- | lib/GitLab/API/v4/RESTClient.pm | 8 | ||||
-rwxr-xr-x | script/gitlab-api-v4 | 6 | ||||
-rwxr-xr-x | t/gitlab-api-v4.t | 2 |
6 files changed, 11 insertions, 11 deletions
@@ -9,7 +9,7 @@ requires 'Types::Common::String' => '1.002001'; requires 'Types::Common::Numeric' => '1.002001'; requires 'Log::Any' => '1.703'; requires 'Carp'; -requires 'JSON' => '2.59'; +requires 'JSON::MaybeXS' => '1.003007'; # Used by GitLab::API::v4::RESTClient. requires 'HTTP::Tiny' => '0.059'; diff --git a/lib/GitLab/API/v4/Config.pm b/lib/GitLab/API/v4/Config.pm index ca6d863..3acd7fd 100644 --- a/lib/GitLab/API/v4/Config.pm +++ b/lib/GitLab/API/v4/Config.pm @@ -28,7 +28,7 @@ L</SYNOPSIS>. use Getopt::Long; use IO::Prompter; -use JSON; +use JSON::MaybeXS; use Log::Any qw( $log ); use Path::Tiny; use Types::Common::String -types; diff --git a/lib/GitLab/API/v4/Mock/RESTClient.pm b/lib/GitLab/API/v4/Mock/RESTClient.pm index d8af5fa..5656efc 100755 --- a/lib/GitLab/API/v4/Mock/RESTClient.pm +++ b/lib/GitLab/API/v4/Mock/RESTClient.pm @@ -18,7 +18,7 @@ This module is used by L<GitLab::API::v4::Mock>. =cut use GitLab::API::v4::Mock::Engine; -use JSON; +use JSON::MaybeXS; use URI; use Moo; diff --git a/lib/GitLab/API/v4/RESTClient.pm b/lib/GitLab/API/v4/RESTClient.pm index ba86773..8f7fae2 100644 --- a/lib/GitLab/API/v4/RESTClient.pm +++ b/lib/GitLab/API/v4/RESTClient.pm @@ -9,9 +9,9 @@ GitLab::API::v4::RESTClient - The HTTP client that does the heavy lifting. =head1 DESCRIPTION -Currently this class uses L<HTTP::Tiny> and L<JSON> to do its job. This may -change, and the interface may change, so documentation is lacking in order -to not mislead people. +Currently this class uses L<HTTP::Tiny> and L<JSON::MaybeXS> to do its job. +This may change, and the interface may change, so documentation is lacking in +order to not mislead people. If you do want to customize how this class works then take a look at the source. @@ -40,7 +40,7 @@ and you will have encountered an error when making the request use Carp qw(); use HTTP::Tiny::Multipart; use HTTP::Tiny; -use JSON; +use JSON::MaybeXS; use Log::Any qw( $log ); use Path::Tiny; use Try::Tiny; diff --git a/script/gitlab-api-v4 b/script/gitlab-api-v4 index 8077283..6ab4a22 100755 --- a/script/gitlab-api-v4 +++ b/script/gitlab-api-v4 @@ -4,7 +4,7 @@ use strictures 2; use GitLab::API::v4::Config; use GitLab::API::v4::Constants qw( :all ); use GitLab::API::v4; -use JSON; +use JSON::MaybeXS; use Log::Any qw( $log ); use Log::Any::Adapter::Screen; use Log::Any::Adapter; @@ -204,14 +204,14 @@ See L<GitLab::API::v4::Paginator/all> for details. --pretty -p -Enables the L<JSON/pretty> feature. +Enables the L<JSON::PP/pretty> feature. =head2 canonical --canonical -c -Enables the L<JSON/canonical> feature. +Enables the L<JSON::PP/canonical> feature. =head1 API METHOD diff --git a/t/gitlab-api-v4.t b/t/gitlab-api-v4.t index 816006c..c469b65 100755 --- a/t/gitlab-api-v4.t +++ b/t/gitlab-api-v4.t @@ -5,7 +5,7 @@ use Test2::Require::AuthorTesting; use Test2::V0; use IPC::Cmd qw(); -use JSON qw(); +use JSON::MaybeXS qw(JSON); my $json = JSON->new->allow_nonref(); |