DESCRIPTION

Object of this class describe classes created by Class::Meta. They contain everything you need to know about a class to be able to put objects of that class to good use. In addition to retrieving metadata about the class itself, you can retrieve objects that describe the constructors, attributes, and methods of the class. See Class::Meta|Class::Meta for a fuller description of the utility of the Class::Meta suite of modules.

Class::Meta::Class objects are created by Class::Meta; they are never instantiated directly in client code. To access the class object for a Class::Meta-generated class, simply call its class method.

INTERFACE

Instance Methods

package

my $pkg = $class->package;

Returns the name of the package that the Class::Meta::Class object describes.

key

my $key = $class->key;

Returns the key name that uniquely identifies the class across the application. The key name may simply be the same as the package name.

name

my $name = $class->name;

Returns the name of the the class. This should generally be a descriptive name, rather than a package name.

desc

my $desc = $class->desc;

Returns a description of the class.

is_a

This method returns true if the object or package name passed as an argument is an instance of the class described by the Class::Meta::Class object or one of its subclasses. Functionally equivalent to $class->package->isa($pkg), but more efficient.

constructors

Provides access to the Class::Meta::Constructor objects that describe the constructors for the class. When called with no arguments, it returns all of the constructor objects. When called with a single argument, it returns the constructor object for the constructor with the specified name. When called with a list of arguments, returns all of the constructor objects with the specified names.

attributes

Provides access to the Class::Meta::Attribute objects that describe the attributes for the class. When called with no arguments, it returns all of the attribute objects. When called with a single argument, it returns the attribute object for the attribute with the specified name. When called with a list of arguments, returns all of the attribute objects with the specified names.

methods

Provides access to the Class::Meta::Method objects that describe the methods for the class. When called with no arguments, it returns all of the method objects. When called with a single argument, it returns the method object for the method with the specified name. When called with a list of arguments, returns all of the method objects with the specified names.