Tangence::Meta::Type(3pm)

Tangence::Meta::Type3pm

Structure representing one "tangence" value type

Overview

This data structure object represents information about a type, such as a method or event argument, a method return value, or a property element type.

Due to their simple contents and immutable nature, these objects may be implemented as singletons. Repeated calls to the constructor method for the same type name will yield the same instance.

Constructor

make

   $type = Tangence::Meta::Type->make( $primitive )

Returns an instance to represent the given primitive type signature.

   $type = Tangence::Meta::Type->make( $aggregate => $member_type )

Returns an instance to represent the given aggregation of the given type instance.

make _from_sig

   $type = Tangence::Meta::Type->make_from_sig( $sig )

Parses the given full Tangence type signature and returns an instance to represent it.

Accessors

aggregate

   $agg = $type->aggregate

Returns "prim" for primitive types, or the aggregation name for list and dict aggregate types.

member_type

   $member_type = $type->member_type

Returns the member type for aggregation types. Throws an exception for primitive types.

sig

   $sig = $type->sig

Returns the Tangence type signature for the type.

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.