txt: ## name.md
  name
  
  Combined from primary sources listed below.
  
  # [In role Metamodel::Naming](#___top "go to top of document")[§](#(role_Metamodel::Naming)_method_name "direct link")
  
  See primary documentation
  [in context](/type/Metamodel/Naming#method_name)
  for **method name**.
  
  ```raku
  method name($type)
  ```
  
  Returns the name of the metaobject, if any.
  
  ```raku
  say 42.^name;       # OUTPUT: «Int␤»
  ```
  
  # [In X::Attribute::Package](#___top "go to top of document")[§](#(X::Attribute::Package)_method_name "direct link")
  
  See primary documentation
  [in context](/type/X/Attribute/Package#method_name)
  for **method name**.
  
  ```raku
  method name(--> Str:D)
  ```
  
  Returns the name of the attribute that triggered this error.
  
  # [In X::IO::Symlink](#___top "go to top of document")[§](#(X::IO::Symlink)_method_name "direct link")
  
  See primary documentation
  [in context](/type/X/IO/Symlink#method_name)
  for **method name**.
  
  Returns the path that [symlink](/routine/symlink) failed to create.
  
  # [In Thread](#___top "go to top of document")[§](#(Thread)_method_name "direct link")
  
  See primary documentation
  [in context](/type/Thread#method_name)
  for **method name**.
  
  ```raku
  method name(Thread:D: --> Str:D)
  ```
  
  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.
  
  ```raku
  my $t1 = Thread.new(code => { for 1..5 -> $v { say $v }});
  my $t2 = Thread.new(code => { for 1..5 -> $v { say $v }}, name => 'my thread');
  
  say $t1.name;                 # OUTPUT: «<anon>␤»
  say $t2.name;                 # OUTPUT: «my thread␤»
  ```
  
  # [In role Encoding](#___top "go to top of document")[§](#(role_Encoding)_method_name "direct link")
  
  See primary documentation
  [in context](/type/Encoding#method_name)
  for **method name**.
  
  ```raku
  method name(--> Str)
  ```
  
  Abstract method that would return the primary name of the encoding.
  
  # [In Parameter](#___top "go to top of document")[§](#(Parameter)_method_name "direct link")
  
  See primary documentation
  [in context](/type/Parameter#method_name)
  for **method name**.
  
  ```raku
  method name(Parameter:D: --> Str:D)
  ```
  
  Returns the parameter name, which includes all [sigils](/language/variables#Sigils) and [twigils](/language/variables#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](#method_named_names). 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`](/type/Nil).
  
  ```raku
  my Signature $sig = :(Str $x, Bool);
  say $sig.params[0].name;                 # OUTPUT: «$x␤»
  say $sig.params[1].name;                 # OUTPUT: «␤»
  
  ```
  
  # [In X::Dynamic::NotFound](#___top "go to top of document")[§](#(X::Dynamic::NotFound)_method_name "direct link")
  
  See primary documentation
  [in context](/type/X/Dynamic/NotFound#method_name)
  for **method name**.
  
  ```raku
  method name(--> Str:D)
  ```
  
  Returns the name of the variable that has not been found.
  
  # [In Metamodel::DefiniteHOW](#___top "go to top of document")[§](#(Metamodel::DefiniteHOW)_method_name "direct link")
  
  See primary documentation
  [in context](/type/Metamodel/DefiniteHOW#method_name)
  for **method name**.
  
  ```raku
  method name($definite_type)
  ```
  
  Returns the name of a definite type.
  
  # [In Scalar](#___top "go to top of document")[§](#(Scalar)_method_name "direct link")
  
  See primary documentation
  [in context](/type/Scalar#method_name)
  for **method name**.
  
  ```raku
  method name(Scalar:D: --> Str)
  ```
  
  Returns the name associated with the container.
  
  Example:
  
  ```raku
  my $x = 42;
  say $x.VAR.name;                # OUTPUT: «$x␤»
  ```
  
  # [In Label](#___top "go to top of document")[§](#(Label)_method_name "direct link")
  
  See primary documentation
  [in context](/type/Label#method_name)
  for **method name**.
  
  Not terribly useful, returns the name of the defined label:
  
  ```raku
  A: while True {
    say A.name; # OUTPUT: «A␤»
    last A;
  }
  ```
  
  # [In X::Bind::NativeType](#___top "go to top of document")[§](#(X::Bind::NativeType)_method_name "direct link")
  
  See primary documentation
  [in context](/type/X/Bind/NativeType#method_name)
  for **method name**.
  
  ```raku
  method name(--> Str:D)
  ```
  
  Returns the name of the variable.
  
  # [In Variable](#___top "go to top of document")[§](#(Variable)_method_name "direct link")
  
  See primary documentation
  [in context](/type/Variable#method_name)
  for **method name**.
  
  ```raku
  method name(Variable:D: str)
  ```
  
  Returns the name of the variable, including the sigil.
  
  # [In Attribute](#___top "go to top of document")[§](#(Attribute)_method_name "direct link")
  
  See primary documentation
  [in context](/type/Attribute#method_name)
  for **method name**.
  
  ```raku
  method name(Attribute:D: --> Str:D)
  ```
  
  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`.
  
  ```raku
  class Foo {
      has @!bar;
  }
  my $a = Foo.^attributes(:local)[0];
  say $a.name;            # OUTPUT: «@!bar␤»
  ```
  
  # [In X::Attribute::NoPackage](#___top "go to top of document")[§](#(X::Attribute::NoPackage)_method_name "direct link")
  
  See primary documentation
  [in context](/type/X/Attribute/NoPackage#method_name)
  for **method name**.
  
  ```raku
  method name(--> Str:D)
  ```
  
  Returns the name of the attribute
  
  # [In Encoding::Registry](#___top "go to top of document")[§](#(Encoding::Registry)_method_name "direct link")
  
  See primary documentation
  [in context](/type/Encoding/Registry#method_name)
  for **method name**.
  
  ```raku
  method register(Encoding $enc --> Nil)
  ```
  
  Register a new [`Encoding`](/type/Encoding).
  
  # [In role Systemic](#___top "go to top of document")[§](#(role_Systemic)_method_name "direct link")
  
  See primary documentation
  [in context](/type/Systemic#method_name)
  for **method name**.
  
  Instance method returning the name of the object.
  
  # [In X::IO::Link](#___top "go to top of document")[§](#(X::IO::Link)_method_name "direct link")
  
  See primary documentation
  [in context](/type/X/IO/Link#method_name)
  for **method name**.
  
  Returns the name of the link that could not be created.
  
  # [In Pod::Block::Named](#___top "go to top of document")[§](#(Pod::Block::Named)_method_name "direct link")
  
  See primary documentation
  [in context](/type/Pod/Block/Named#method_name)
  for **method name**.
  
  ```raku
  method name(--> Str:D)
  ```
  
  Returns the name of the block.
  
  # [In ForeignCode](#___top "go to top of document")[§](#(ForeignCode)_method_name "direct link")
  
  See primary documentation
  [in context](/type/ForeignCode#method_name)
  for **method name**.
  
  ```raku
  method name()
  ```
  
  Returns the name of the enclosed code, or `<anon>` if it has not received any.
  
  # [In X::Attribute::Required](#___top "go to top of document")[§](#(X::Attribute::Required)_method_name "direct link")
  
  See primary documentation
  [in context](/type/X/Attribute/Required#method_name)
  for **method name**.
  
  ```raku
  method name(--> Str:D)
  ```
  
  Returns the name of the attribute.
  
  # [In Routine](#___top "go to top of document")[§](#(Routine)_method_name "direct link")
  
  See primary documentation
  [in context](/type/Routine#method_name)
  for **method name**.
  
  ```raku
  method name(Routine:D: --> Str:D)
  ```
  
  Returns the name of the sub or method.
  
  # [In X::Signature::NameClash](#___top "go to top of document")[§](#(X::Signature::NameClash)_method_name "direct link")
  
  See primary documentation
  [in context](/type/X/Signature/NameClash#method_name)
  for **method name**.
  
  ```raku
  method name(--> Str:D)
  ```
  
  Returns the name that was used for more than one parameter.
  