Changeset 2302

Show
Ignore:
Timestamp:
08/04/07 07:30:59
Author:
miyagawa
Message:

store JSON::Any object that holds the reference to the current encoder object. This prevents JSON::Any to change the backend later, by modules like WWW::Facebook::API.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Catalyst-View-JSON/trunk/lib/Catalyst/View/JSON.pm

    r2215 r2302  
    3030    eval { 
    3131        JSON::Any->import($driver); 
    32         $self->json_dumper(sub { JSON::Any->objToJson($_[0]) }); 
     32        my $json = JSON::Any->new; # create the copy of JSON handler 
     33        $self->json_dumper(sub { $json->objToJson($_[0]) }); 
    3334    }; 
    3435