Perl 5 MOP - Meta Object Protocol - Attribute Sub Protocol
This document will describe the proposed API for the attribute sub-protocol of the MOP.
Currently the attribute sub-protocol is very small, and it will likely stay this way. However, as has been found with Moose, this sub-protocol is an extremely powerful extension point.
The attribute sub-protocol is (at this stage) completely immutable. The reason being that we believe it is dangerous to allow the manipulation of attribute internals simply for the huge potential impact that could have. Instead you are encouraged to simply clone an attribute and change the values during the clone process.
AUTHORS NOTE: This is by no means a comprehensive list, nor is it a fixed list, of methods. This is simply the first draft of this.
This returns the name of the attribute as a string.
This returns the name of the attribute with the sigil stripped off.
This returns the initial value (if any) that the attribute was given.
This returns a suitable copy of the initial value of the attribute to be used in instance construction.
clone( %params )
Clone this object and override any internal elements using the values in
Stevan Little <firstname.lastname@example.org>
Copyright 2011 Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.