From: Chris Prather Date: Mon, 25 May 2009 16:50:05 +0000 (-0400) Subject: correct the documentation for required X-Git-Tag: 0.80~67 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=81bec8f8156c0434f5426eeb6e7157c66137b3e1;p=gitmo%2FMoose.git correct the documentation for required --- diff --git a/lib/Moose.pm b/lib/Moose.pm index e64915f..3c24df2 100644 --- a/lib/Moose.pm +++ b/lib/Moose.pm @@ -437,9 +437,11 @@ is expected to have consumed. =item I (1|0)> -This marks the attribute as being required. This means a I value must be -supplied during class construction, and the attribute may never be set to -C with an accessor. +This marks the attribute as being required. This means a value must be +supplied during class construction or be lazy with either a default or a +builder. Note that c does not say anything about the attribute's +value, so it could be C. + =item I (1|0)> diff --git a/lib/Moose/Manual/Attributes.pod b/lib/Moose/Manual/Attributes.pod index 4ee76e5..174c624 100644 --- a/lib/Moose/Manual/Attributes.pod +++ b/lib/Moose/Manual/Attributes.pod @@ -160,9 +160,9 @@ required, simply set the C option to true: There are a couple caveats worth mentioning in regards to what "required" actually means. -Basically, all it says is that this attribute (C) must be provided -to the constructor. It does not say anything about its value, so it -could be C. +Basically, all it says is that this attribute (C) must be provided to +the constructor, or be lazy with either a default or a builder. It does not +say anything about its value, so it could be C. If you define a clearer method on a required attribute, the clearer I work, so even a required attribute can be unset after object