method package

Documentation for method package assembled from the following types:

class Routine

From Routine

(Routine) method package

method package(Routine:D:)

Returns the package in which the routine is defined.

class Attribute

From Attribute

(Attribute) method package

Defined as:

method package()

Returns the package (class/grammar/role) to which this attribute belongs.

class Boo {
    has @!baz;
}
my $a = Boo.^attributes(:local)[0];
say $a.package;         # OUTPUT: «(Boo)␤»

class X::Augment::NoSuchType

From X::Augment::NoSuchType

(X::Augment::NoSuchType) method package

Returns the name that was tried to augment, but which doesn't exist.