Course of Raku / Advanced / Modules
Packages and namespaces 🆕
A namespace is a named container for other named things,
such as variables and subroutines. It keeps names from colliding:
Maths::pi and Physics::pi can both exist
without clashing. A package is the most basic kind of
namespace.
You have already used a namespace without naming it: every
module creates one. This section looks at packages
directly, and at how our variables and the ::
separator let you reach into a namespace from outside.
Topics in this section
Practice
Complete the quiz that covers the contents of this section.
Exercises
This section contains 3 exercises. Examine all the topics of this section before doing the coding practice.