|
NAME"Object::Pad::MOP::FieldAttr" - meta-object representation of a field attribute for "Object::Pad"DESCRIPTIONThis API provides a way for pure-perl implementations of field attributes to be provided. Pure-perl attributes cannot currently add new behaviour to the way that fields work, but they do provide a means for class authors to annotate extra metadata onto fields, that can be queried by other code.Primilarily this is done by using the "get_attribute_value" in Object::Pad::MOP::Field accessor method on a field metadata instance. This API should be considered experimental, and will emit warnings to that effect. They can be silenced with use Object::Pad qw( :experimental(custom_field_attr) ); METHODSregisterObject::Pad::MOP::FieldAttr->register( $name, %args ) Since version 0.60. Creates a new field attribute of the given name. The name must begin with a capital letter, in order to distinguish this from any of the built-in core attributes, whose names are lowercase. The attribute is only available if the hints hash contains a key of the name given by the attribute's "permit_hintkey" argument. This would typically be set in the hints hash by the "import" method of the module implementing it, and would be named based on the name of the module providing the attribute: sub import { $^H{"Some::Package::Name/Attrname"} } Takes the following additional named arguments:
AUTHORPaul Evans <leonerd@leonerd.org.uk>
Visit the GSP FreeBSD Man Page Interface. |