From: Ricardo Signes Date: Thu, 15 Apr 2010 14:03:37 +0000 (-0400) Subject: changelog/docs X-Git-Tag: 0.27~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=39535adabc29b68fa5468391c327a80448fa51db;p=gitmo%2FMooseX-Storage.git changelog/docs --- diff --git a/Changes b/Changes index 899091a..a986dd2 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for MooseX-Storage +0.27 + * use of parameterized roles (first added in 0.22) now works in Deferred + Example: $object->freeze({ format => [ $role_name => \%args ] }) + 0.26 * Fix URI for repository in metadata. * Fix infinite recursion when collapsing objects which overload stringify 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