builder vs initializer
[email protected] ("Ian Tegebo")
| Newsgroups | perl.moose |
|---|---|
| Message-ID | <[email protected]> |
When does one want a builder of an attribute, vs an initalizer? I'm not sure what the difference is: Description of 'builder' from Class::MOP::Attribute, [...] This should be a method in the class associated with the attribute, not a method in the attribute class itself. Does this mean a method in My::Class vs one in Class::MOP::Attribute or some subclass thereof? And then in the description of 'initializer' from Class::MOP::Attribute, [...] The initializer is used to set the attribute value on an instance when the attribute is set during instance initialization. [...] Does the 'builder' _not_ set the value during instance initialization? -- Ian Tegebo