Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix prototype mismatch warning for JSON functions. #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Catalyst/Plugin/RapidApp/NavCore/Controller.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use RapidApp::Util qw(:all);
require Module::Runtime;
require Catalyst::Utils;

use JSON qw(decode_json);
use JSON::MaybeXS qw(decode_json);

# Controller for loading a saved search in CoreSchema via ID

Expand Down
6 changes: 3 additions & 3 deletions lib/RapidApp/JSON/MixedEncoder.pm
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ our %SCALARREF_VALUE_MAP = (
# ---


# copied from JSON::PP
# copied from JSON::PP, but match prototypes to Cpanel::JSON::XS.
my $JSON; # cache
sub encode_json ($) { # encode
sub encode_json ($;$) { # encode
($JSON ||= __PACKAGE__->new)->encode($_[0]);
}
sub decode_json ($) { # decode
sub decode_json ($;$$) { # decode
($JSON ||= __PACKAGE__->new)->decode($_[0]);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/RapidApp/Test.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use Import::Into;

use Time::HiRes qw(gettimeofday tv_interval);
use HTTP::Request::Common;
use JSON qw(decode_json);
use JSON::MaybeXS qw(decode_json);
use Catalyst::Utils;
use RapidApp::Test::Client;

Expand Down
2 changes: 1 addition & 1 deletion lib/RapidApp/Test/Client.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use Scalar::Util qw(blessed);
use Time::HiRes qw(gettimeofday tv_interval);
use LWP::UserAgent;
use HTTP::Request::Common;
use JSON qw(decode_json);
use JSON::MaybeXS qw(decode_json);
use Try::Tiny;

# shorthand aliases:
Expand Down
2 changes: 1 addition & 1 deletion lib/RapidApp/Util/MetaKeys.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use Types::Standard qw(:all);
use Scalar::Util qw(blessed);

use RapidApp::Util::MetaKeys::FK;
use JSON qw( from_json -support_by_pp );
use JSON::MaybeXS qw( from_json );
use Path::Class qw( file dir );
use Try::Tiny;

Expand Down