diff options
author | Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com> | 2011-12-05 13:54:26 +0000 |
---|---|---|
committer | Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com> | 2011-12-05 13:54:26 +0000 |
commit | c152c2bc62dfb63d11c87b2376e77b41568c537d (patch) | |
tree | 84ada6f96a85484d4a24c7aa28063e6007d52503 /lib/Data | |
parent | Build results of beb5924 (on master) (diff) | |
parent | WIP use pod::weaver really (diff) | |
download | data-multivalued-c152c2bc62dfb63d11c87b2376e77b41568c537d.tar.gz data-multivalued-c152c2bc62dfb63d11c87b2376e77b41568c537d.tar.bz2 data-multivalued-c152c2bc62dfb63d11c87b2376e77b41568c537d.zip |
Build results of beb5924 (on master)
Diffstat (limited to 'lib/Data')
-rw-r--r-- | lib/Data/MultiValued/AttributeTrait.pm | 45 |
1 files changed, 14 insertions, 31 deletions
diff --git a/lib/Data/MultiValued/AttributeTrait.pm b/lib/Data/MultiValued/AttributeTrait.pm index 167fc4d..322feb2 100644 --- a/lib/Data/MultiValued/AttributeTrait.pm +++ b/lib/Data/MultiValued/AttributeTrait.pm @@ -331,37 +331,6 @@ non-multi accessor. So, for example, will create a C<stuff> read / write accessor and a C<stuff_multi> read / write tagged accessor. -=head1 ATTRIBUTES - -=head2 C<full_storage_slot> - -The instance slot to use to store the C<Data::MultiValued::Tags> or -similar object. Defaults to C<"${name}__MULTIVALUED_STORAGE__">, where -C<$name> is the attribute name. - -=head2 C<multi_accessor> - -=head2 C<multi_reader> - -=head2 C<multi_writer> - -=head2 C<multi_predicate> - -=head2 C<multi_clearer> - -The names to use for the various additional accessors. See -L<Class::MOP::Attribute> for details. These default to -C<"${name}_multi"> where C<$name> is the name of the corresponding -non-multi accessor. So, for example, - - has stuff => ( - is => 'rw', - traits => ['MultiValued::Tags'], - ); - -will create a C<stuff> read / write accessor and a C<stuff_multi> read -/ write tagged accessor. - =head1 METHODS =head2 C<slots> @@ -476,6 +445,20 @@ Returns the result of calling C<_as_hash> on the value inside the L</full_storage_slot> of the instance. Returns nothing if the slot does not have a value. +=head1 ATTRIBUTES + +These are the attributes that this trait adds to the attribute in +your class. Example: + + has stuff => ( + is => 'rw', + isa => 'Int', + traits => ['MultiValued::Tags'], + predicate => 'has_stuff', + multi_accessor => 'stuff_tagged', + multi_predicate => 'has_stuff_tagged', + ); + =head1 Implementation details The multi-value object is stored in the instance slot named by the |