X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FStorage.pm;h=4dfc86d61dab62399d4535fff8a6f365e27d30fc;hb=8af2c2b01fe7c63f2748d1b1deca3198c8974b7f;hp=f104e989fc668e82b2435e4a96e7ecea87a5ce00;hpb=efd4f7a5691295a10f74399e63731adb9a209057;p=gitmo%2FMooseX-Storage.git diff --git a/lib/MooseX/Storage.pm b/lib/MooseX/Storage.pm index f104e98..4dfc86d 100644 --- a/lib/MooseX/Storage.pm +++ b/lib/MooseX/Storage.pm @@ -1,13 +1,9 @@ - package MooseX::Storage; use Moose qw(confess); use MooseX::Storage::Meta::Attribute::DoNotSerialize; use String::RewritePrefix (); -our $VERSION = '0.35'; -our $AUTHORITY = 'cpan:STEVAN'; - sub import { my $pkg = caller(); @@ -119,8 +115,6 @@ MooseX::Storage - A serialization framework for Moose classes use Moose; use MooseX::Storage; - our $VERSION = '0.01'; - with Storage('format' => 'JSON', 'io' => 'File'); has 'x' => (is => 'rw', isa => 'Int'); @@ -184,7 +178,7 @@ The first (base) level is C and C. In this level the class is serialized into a Perl HASH reference, it is tagged with the class name and each instance attribute is stored. Very simple. -This level is not optional, it is the bare minumum that +This level is not optional, it is the bare minimum that MooseX::Storage provides and all other levels build on top of this. See L for the fundamental implementation and @@ -200,6 +194,8 @@ specific serialization format and Perl land. This level is optional, if you don't want/need it, you don't have to have it. You can just use C/C instead. +=for stopwords io + =item B The third (io) level is C and C. In this level we are reading @@ -224,7 +220,7 @@ The following traits are currently bundled with C: =item OnlyWhenBuilt -Only attributes that have been built (ie, where the predicate returns +Only attributes that have been built (i.e., where the predicate returns 'true') will be serialized. This avoids any potentially expensive computations. See L for details. @@ -244,9 +240,11 @@ MooseX::Storage enabled objects are supported. With Array and Hash references the first level down is inspected and any objects found are serialized/deserialized for you. We do not do -this recusively by default, however this feature may become an +this recursively by default, however this feature may become an option eventually. +=for stopwords subtypes + The specific serialize/deserialize routine is determined by the Moose type constraint a specific attribute has. In most cases subtypes of the supported types are handled correctly, and there is a facility @@ -296,6 +294,8 @@ that is not under the default namespace prefix, start with an equal sign: Storage(format => '=My::Private::JSONFormat'); +=for stopwords parameterized + To use a parameterized role (for which, see L) you can pass an arrayref of the role name (in short or long form, as above) and its parameters: @@ -320,6 +320,8 @@ parameters: =back +=for stopwords TODO + =head1 TODO This module needs docs and probably a Cookbook of some kind as well. @@ -353,3 +355,5 @@ This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut + +