Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

store JSON::Any object that holds the reference to the current encode…

…r object. This prevents JSON::Any to change the backend later, by modules like WWW::Facebook::API.
  • Loading branch information...
commit f35892ff54006ab32aa11bbb8d530dd13cd8c621 1 parent 53aa595
@miyagawa authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/Catalyst/View/JSON.pm
View
3  lib/Catalyst/View/JSON.pm
@@ -29,7 +29,8 @@ sub new {
eval {
JSON::Any->import($driver);
- $self->json_dumper(sub { JSON::Any->objToJson($_[0]) });
+ my $json = JSON::Any->new; # create the copy of JSON handler
+ $self->json_dumper(sub { $json->objToJson($_[0]) });
};
if (my $error = $@) {
Please sign in to comment.
Something went wrong with that request. Please try again.