class X::Attribute::NoPackage does X::Comp { }

Compile time error thrown when an attribute is declared where it does not make sense (for example in the mainline).

For example

has $.x;

Dies with

You cannot declare attribute '$.x' heremaybe you'd like a class or a role?


method name§

method name(--> Str:D)

Returns the name of the attribute


Type relations for X::Attribute::NoPackage
raku-type-graph X::Attribute::NoPackage X::Attribute::NoPackage Exception Exception X::Attribute::NoPackage->Exception X::Comp X::Comp X::Attribute::NoPackage->X::Comp Mu Mu Any Any Any->Mu Exception->Any X::Comp->Exception

Expand chart above