Documentation for method name
assembled from the following pages:
Role: Encoding §
From Encoding
(Encoding) method name §
method name(--> Str)
Abstract method that would return the primary name of the encoding.
Class: Thread §
From Thread
(Thread) method name §
method name(Thread: --> Str)
Returns the user defined string, which can optionally be set during object creation in order to identify the Thread
, or '<anon>' if no such string was specified.
my = Thread.new(code => );my = Thread.new(code => , name => 'my thread'); say .name; # OUTPUT: «<anon>» say .name; # OUTPUT: «my thread»
Class: X::Attribute::NoPackage §
(X::Attribute::NoPackage) method name §
method name(--> Str)
Returns the name of the attribute
Class: X::Attribute::Package §
(X::Attribute::Package) method name §
method name(--> Str)
Returns the name of the attribute that triggered this error.
Class: X::Attribute::Required §
(X::Attribute::Required) method name §
method name(--> Str)
Returns the name of the attribute.
Class: X::Bind::NativeType §
From X::Bind::NativeType
(X::Bind::NativeType) method name §
method name(--> Str)
Returns the name of the variable.
Class: X::Dynamic::NotFound §
From X::Dynamic::NotFound
(X::Dynamic::NotFound) method name §
method name(--> Str)
Returns the name of the variable that has not been found.
Class: X::IO::Link §
From X::IO::Link
(X::IO::Link) method name §
Returns the name of the link that could not be created.
Class: X::IO::Symlink §
From X::IO::Symlink
(X::IO::Symlink) method name §
Returns the path that symlink failed to create.
Class: X::Signature::NameClash §
(X::Signature::NameClash) method name §
method name(--> Str)
Returns the name that was used for more than one parameter.
Class: Encoding::Registry §
From Encoding::Registry
(Encoding::Registry) method name §
method register(Encoding --> Nil)
Register a new Encoding.
Class: Metamodel::DefiniteHOW §
(Metamodel::DefiniteHOW) method name §
method name()
Returns the name of a definite type.
Role: Metamodel::Naming §
From Metamodel::Naming
(Metamodel::Naming) method name §
method name()
Returns the name of the metaobject, if any.
say 42.^name; # OUTPUT: «Int»
Class: Attribute §
From Attribute
(Attribute) method name §
Defined as:
method name(Attribute: --> Str)
Returns the name of the attribute. Note that this is always the private name, so if an attribute is declared as has $.a
, the name returned is $!a
.
my = Foo.^attributes(:local)[0];say .name; # OUTPUT: «@!bar»
Class: Pod::Block::Named §
From Pod::Block::Named
(Pod::Block::Named) method name §
method name(--> Str)
Returns the name of the block.
Class: Scalar §
From Scalar
(Scalar) method name §
method name(Scalar: --> Str)
Returns the name associated with the container.
Example:
my = 42;say .VAR.name; # OUTPUT: «$x»
Class: ForeignCode §
From ForeignCode
(ForeignCode) method name §
method name()
Returns the name of the enclosed code, or <anon>
if it has not received any.
Class: Parameter §
From Parameter
(Parameter) method name §
Defined as:
method name(Parameter: --> Str)
Returns the parameter name, which includes all sigils and twigils. This name is used internally when applied to code, or in a declaration to determine the declared the name. This name is not necessarily usable by a caller – if it is, it will also appear as an alias. Often, the name will be chosen descriptively as a form of self-documentation.
If the parameter is anonymous, an empty string will be returned.
Note: Before Rakudo version 2020.08 the return value for an anonymous parameter was Nil
.
my Signature = :(Str , Bool);say .params[0].name; # OUTPUT: «$x» say .params[1].name; # OUTPUT: «»
Role: Systemic §
From Systemic
(Systemic) method name §
Instance method returning the name of the object.
Class: Routine §
From Routine
(Routine) method name §
method name(Routine: --> Str)
Returns the name of the sub or method.
Class: Label §
From Label
(Label) method name §
Not terribly useful, returns the name of the defined label:
A: while True
Class: Variable §
From Variable
(Variable) method name §
method name(Variable: str)
Returns the name of the variable, including the sigil.