From: Dave Rolsky Date: Tue, 18 Dec 2007 21:05:25 +0000 (+0000) Subject: Clarify that the accessor for default returns whatever was given (even X-Git-Tag: 0_51~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=92d2abfa8fd9ee64615b20b1233cde5260a7d537;p=gitmo%2FClass-MOP.git Clarify that the accessor for default returns whatever was given (even a coderef) and clarify that passing in an $instance is a special case. Also made the tense of "Return" at the beginning of a sentence consistent. --- diff --git a/lib/Class/MOP/Attribute.pm b/lib/Class/MOP/Attribute.pm index bcd1097..41b2239 100644 --- a/lib/Class/MOP/Attribute.pm +++ b/lib/Class/MOP/Attribute.pm @@ -534,7 +534,7 @@ even to attributes with just write only accessors. =item B -Returns a boolean indicating if the item in the C<$instance> has a value in it. +Return a boolean indicating if the item in the C<$instance> has a value in it. This is basically what the default C method calls. =item B @@ -570,13 +570,15 @@ passed into C. I think they are pretty much self-explanitory. =item B -As noted in the documentation for C above, if the I -value is a CODE reference, this accessor will pass a single additional -argument C<$instance> into it and return the value. +Return the default value for the attribute. + +If you pass in an C<$instance> argument to this accessor and the +I is a CODE reference, then the CODE reference will be +executed with the C<$instance> as its argument. =item B -Returns a list of slots required by the attribute. This is usually +Return a list of slots required by the attribute. This is usually just one, which is the name of the attribute. =item B