X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FStorage%2FDeferred.pm;h=19d34b2a2bddcbd816deed3adfb077b5c2cf4864;hb=39535adabc29b68fa5468391c327a80448fa51db;hp=1e34f16b4d9af2d48d7abc5f2ceb9b627fa6f441;hpb=54d6ff364f51d33839d796256e295f165e20fa7b;p=gitmo%2FMooseX-Storage.git diff --git a/lib/MooseX/Storage/Deferred.pm b/lib/MooseX/Storage/Deferred.pm index 1e34f16..19d34b2 100644 --- a/lib/MooseX/Storage/Deferred.pm +++ b/lib/MooseX/Storage/Deferred.pm @@ -93,6 +93,9 @@ MooseX::Storage::Deferred - A role for undecisive programmers # pack the class into a JSON string $p->freeze({ format => 'JSON' }); # { "__CLASS__" : "Point", "x" : 10, "y" : 10 } + # pack the class into a JSON string using parameterized JSONpm role + $p->freeze({ format => [ JSONpm => { json_opts => { pretty => 1 } } ] }); + # unpack the JSON string into a class my $p2 = Point->thaw( '{ "__CLASS__" : "Point", "x" : 10, "y" : 10 }', @@ -114,6 +117,8 @@ SYNOPSIS for more info) =item I +=item I + =item I =item I