Tangence::Meta::Class(3pm)

Tangence::Meta::Class3pm

Structure representing one "tangence" class

Overview

This data structure object stores information about one Tangence class. Once constructed and defined, such objects are immutable.

Constructor

new

   $class = Tangence::Meta::Class->new( name => $name )

Returns a new instance representing the given name.

define

   $class->define( %args )

Provides a definition for the class.

methods => HASH
events => HASH
properties => HASH

Optional HASH references containing metadata about methods, events and properties, as instances of Tangence::Meta::Method, Tangence::Meta::Event or Tangence::Meta::Property.

superclasses => ARRAY

Optional ARRAY reference containing superclasses as "Tangence::Meta::Class" references.

Accessors

defined

   $defined = $class->defined

Returns true if a definintion for the class has been provided using "define".

name

   $name = $class->name

Returns the name of the class

perlname

   $perlname = $class->perlname

Returns the perl name of the class. This will be the Tangence name, with dots replaced by double colons ("::").

direct_superclasses

   @superclasses = $class->direct_superclasses

Return the direct superclasses in a list of "Tangence::Meta::Class" references.

direct_methods

   $methods = $class->direct_methods

Return the methods that this class directly defines (rather than inheriting from superclasses) as a HASH reference mapping names to Tangence::Meta::Method instances.

direct_events

   $events = $class->direct_events

Return the events that this class directly defines (rather than inheriting from superclasses) as a HASH reference mapping names to Tangence::Meta::Event instances.

direct_properties

   $properties = $class->direct_properties

Return the properties that this class directly defines (rather than inheriting from superclasses) as a HASH reference mapping names to Tangence::Meta::Property instances.

Aggregate accessors

The following accessors inspect the full inheritance tree of this class and all its superclasses

superclasses

   @superclasses = $class->superclasses

Return all the superclasses in a list of unique "Tangence::Meta::Class" references.

methods

   $methods = $class->methods

Return all the methods available to this class as a HASH reference mapping names to Tangence::Meta::Method instances.

method

   $method = $class->method( $name )

Return the named method as a Tangence::Meta::Method instance, or "undef" if no such method exists.

events

   $events = $class->events

Return all the events available to this class as a HASH reference mapping names to Tangence::Meta::Event instances.

event

   $event = $class->event( $name )

Return the named event as a Tangence::Meta::Event instance, or "undef" if no such event exists.

properties

   $properties = $class->properties

Return all the properties available to this class as a HASH reference mapping names to Tangence::Meta::Property instances.

property

   $property = $class->property( $name )

Return the named property as a Tangence::Meta::Property instance, or "undef" if no such property exists.

Releases

4 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11
  3. 12
  4. 13

Author

Paul Evans <[email protected]>

From libtangence-perl 0.33-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.