X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FManual%2FAttributes.pod;h=66d9364718db5ffe9e43f50889e805b5b58ff2f4;hb=1a1774e160f46ec32feca591ee76790955b56f03;hp=7f3f04358ab24db2a8c1523aea01ffa93f17cc48;hpb=adb7f3cafbd066eb2dc7d50bd0a4cff59bc6b203;p=gitmo%2FMoose.git diff --git a/lib/Moose/Manual/Attributes.pod b/lib/Moose/Manual/Attributes.pod index 7f3f043..66d9364 100644 --- a/lib/Moose/Manual/Attributes.pod +++ b/lib/Moose/Manual/Attributes.pod @@ -61,7 +61,7 @@ read and write the value of that attribute for an object. By default, the accessor method has the same name as the attribute. If you declared your attribute as C then your accessor will be -read-only. If you declared it read-write, you get a read-write +read-only. If you declared it as C, you get a read-write accessor. Simple. Given our C example above, we now have a single C @@ -606,16 +606,18 @@ it. If your attribute is an array reference or hash reference, the C option will make Moose dereference the value when it is -returned from the reader method: +returned from the reader method I: my %map = $object->mapping; This option only works if your attribute is explicitly typed as an -C or C. +C or C. When the reader is called in I context, +the reference itself is returned. However, we recommend that you use L traits for these types of attributes, which gives you much more control over how -they are accessed and manipulated. +they are accessed and manipulated. See also +L. =head2 Initializer