BrowserREPL-button-tip-on BrowserREPL-button-tip-off

EditButtonTip 2026-10-28

class RakuAST::Name::Part::Simple

Represent a string part of a RakuAST::Name

class RakuAST::Name::Part::Simple { }
Code

The RakuAST::Name::Part::Simple class represents a simple string part of a RakuAST::Name object.

Object introspection§

RakuAST::Name::Part::Simple object is typically created when parsing Raku Programming Language code. So most developers will only need to know how to introspect the objects created.

name§

say $part.name;  # foo
Code

Returns the name of this part as a Str.

is-empty§

say $part.is-empty;  # True or False
Code

Returns whether this is an empty part of a RakuAST::Name.

is-pseudo-package§

say $part.is-pseudo-package;  # True or False
Code

Returns whether this part could be considered a pseudo-package name. The following names would be considered pseudo-packages:

  • CALLER
  • CALLERS
  • CLIENT
  • COMPILING
  • CORE
  • DYNAMIC
  • LEXICAL
  • MY
  • OUR
  • OUTER
  • OUTERS
  • SETTING
  • UNIT

Object creation§

my $part = RakuAST::Name::Part::Simple.new($name);
Code

A RakuAST::Name::Part::Simple object is instantiated with the .new method. It takes a single argument: the string to be used for the name.