The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Type - Perl 6 types

SYNOPSIS

 my $class = Class.new("SomeClass");
 my $type = Type.new(Class.new("SomeClass"));

 $class.apply;

 $type =:= ::SomeClass;   # true

DESCRIPTION

Every variable in Perl 6 has a type. This type can be accessed using the .ref method, which is available on any type, boxed or unboxed.

These objects are what you get from ::SomeClass references.

Note that this could be a different entity to the objects that are created when you use;

  type Bar;
  subtype Foo of Str where { rx/^Foo/ };

It is probably bad to have both a MetaClass called Type and a language object called Type. Perhaps this module should be called something else like t, or maybe the type keyword actually creates one of these objects.