From: Ricardo Signes Date: Thu, 5 Nov 2009 20:34:54 +0000 (-0500) Subject: docs, prereq X-Git-Tag: 0.22~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=25697231931e82932eb5e4fbd302c9faa82c066a;p=gitmo%2FMooseX-Storage.git docs, prereq --- diff --git a/Makefile.PL b/Makefile.PL index ebf58b3..6e76ad6 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -7,6 +7,7 @@ all_from 'lib/MooseX/Storage.pm'; # Specific dependencies requires 'Moose' => '0.87'; +requires 'String::RewritePrefix'; # you should have at least one # serialization format diff --git a/lib/MooseX/Storage.pm b/lib/MooseX/Storage.pm index 86b5858..05b2433 100644 --- a/lib/MooseX/Storage.pm +++ b/lib/MooseX/Storage.pm @@ -271,6 +271,21 @@ combination of features. It is meant to make things easier, but it is by no means the only way. You can still compose your roles by hand if you like. +By default, options are assumed to be short forms. For example, this: + + Storage(format => 'JSON'); + +...will result in looking for MooseX::Storage::Format::JSON. To use a role +that is not under the default namespace prefix, start with an equal sign: + + Storage(format => '=My::Private::JSONFormat'); + +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: + + Storage(format => [ JSONpm => { json_opts => { pretty => 1 } } ]); + =back =head1 METHODS