NAME

Test::Builder2::Mouse::Meta::Class - The Mouse class metaclass

VERSION

This document describes Mouse version 0.53

METHODS

initialize(ClassName) -> Test::Builder2::Mouse::Meta::Class

Finds or creates a Test::Builder2::Mouse::Meta::Class instance for the given ClassName. Only one instance should exist for a given class.

name -> ClassName

Returns the name of the owner class.

superclasses -> ClassNames superclass(ClassNames)

Gets (or sets) the list of superclasses of the owner class.

add_method(name => CodeRef)

Adds a method to the owner class.

has_method(name) -> Bool

Returns whether we have a method with the given name.

get_method(name) -> Test::Builder2::Mouse::Meta::Method | undef

Returns a Test::Builder2::Mouse::Meta::Method with the given name.

Note that you can also use $metaclass->name->can($name) for a method body.

get_method_list -> Names

Returns a list of method names which are defined in the local class. If you want a list of all applicable methods for a class, use the get_all_methods method.

get_all_methods -> (Test::Builder2::Mouse::Meta::Method)

Return the list of all Test::Builder2::Mouse::Meta::Method instances associated with the class and its superclasses.

add_attribute(name => spec | Test::Builder2::Mouse::Meta::Attribute)

Begins keeping track of the existing Test::Builder2::Mouse::Meta::Attribute for the owner class.

has_attribute(Name) -> Bool

Returns whether we have a Test::Builder2::Mouse::Meta::Attribute with the given name.

get_attribute Name -> Test::Builder2::Mouse::Meta::Attribute | undef

Returns the Test::Builder2::Mouse::Meta::Attribute with the given name.

get_attribute_list -> Names

Returns a list of attribute names which are defined in the local class. If you want a list of all applicable attributes for a class, use the get_all_attributes method.

get_all_attributes -> (Test::Builder2::Mouse::Meta::Attribute)

Returns the list of all Test::Builder2::Mouse::Meta::Attribute instances associated with this class and its superclasses.

linearized_isa -> [ClassNames]

Returns the list of classes in method dispatch order, with duplicates removed.

new_object(Parameters) -> Instance

Creates a new instance.

clone_object(Instance, Parameters) -> Instance

Clones the given instance which must be an instance governed by this metaclass.

throw_error(Message, Parameters)

Throws an error with the given message.

SEE ALSO

Test::Builder2::Mouse::Meta::Module

Moose::Meta::Class

Class::MOP::Class