Add localizer; use JSON::MaybeXS; avoid EOL-check for tests#23
Open
basiliscos wants to merge 8 commits intoderiv-com:masterfrom
Open
Add localizer; use JSON::MaybeXS; avoid EOL-check for tests#23basiliscos wants to merge 8 commits intoderiv-com:masterfrom
basiliscos wants to merge 8 commits intoderiv-com:masterfrom
Conversation
Contributor
Author
|
Test pass on qa |
tom-binary
reviewed
Oct 31, 2017
Contributor
tom-binary
left a comment
There was a problem hiding this comment.
Couple of minor points but the concept looks fine, thanks.
Don't forget to update the documentation for the new config parameter!
| use MojoX::JSON::RPC::Client; | ||
| use Guard; | ||
| use JSON; | ||
| use JSON::MaybeXS; |
Contributor
There was a problem hiding this comment.
cpanfile needs updating? Although I'd suggest better to use Mojo::JSON, that way 3rd-party users get consistent handling across Mojolicious code.
|
|
||
| die 'No base path found!' unless $config->{base_path}; | ||
|
|
||
| my $localizer = (ref($config->{localizer}) // '?') eq 'CODE' |
Contributor
There was a problem hiding this comment.
no need for the // fallback here, ref returns an empty string for non-refs/undef. However, I'd suggest better to make it $config->{localizer} || sub { $_[1] } otherwise it's silently ignoring invalid parameters such as localizer => "some_helper_name".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.