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

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

Returns the name of this part as a Str.

is-empty§

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

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

is-pseudo-package§

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

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);

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.