VERSION

version 0.27

SYNOPSIS

  for my $attr ( HasClassAttributes->meta()->get_all_class_attributes() )
  {
      print $attr->name();
  }

DESCRIPTION

This role adds awareness of class attributes to a metaclass object. It provides a set of introspection methods that largely parallel the existing attribute methods, except they operate on class attributes.

METHODS

Every method provided by this role has an analogous method in \*(C`Class::MOP::Class\*(C' or \*(C`Moose::Meta::Class\*(C' for regular attributes. These methods operate on the current metaclass only. This accepts the same options as the Moose::Meta::Attribute \*(C`add_attribute()\*(C' method. However, if an attribute is specified as \*(L"required\*(R" an error will be thrown. If the named class attribute exists, it is removed from the class, along with its accessor methods. This method returns a list of attribute objects for the class and all its parent classes. This method looks at the class and all its parent classes for the named class attribute. These methods operate on the storage for class attribute values, which is attached to the metaclass object.

There's really no good reason for you to call these methods unless you're doing some deep hacking. They are named as public methods solely because they are used by other meta roles and classes in this distribution.

BUGS

See MooseX::ClassAttribute for details.

AUTHOR

Dave Rolsky <[email protected]>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2013 by Dave Rolsky.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)