The code which implements setting an attribute value. Note that this code does not need to implement type constraint checks, etc. $meta is a Moose::Meta::Attribute object describing the attribute; $instance is the object itself.

The code which implements the predicate functionality for an attribute. That is, it should return true if the attribute has been set, and false if the attribute is unset. (Note that Moose does allow attribute values to be set to undefined, so settedness is not the same as definedness.)

Moose attempts to create inlined attribute accessors whenever possible. The following coderefs can be defined which must return strings of Perl code suitable for inlining the accessors. They are each optional, but unless all of them are defined, your attribute will not be inlined.