Documentation for method package assembled from the following pages:

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.

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: Routine §

From Routine

(Routine) method package §

method package(Routine:D:)

Returns the package in which the routine is defined.