Documentation for syntax use
assembled from the following pages:
Language documentation: Modules §
From Modules
(Modules) Syntax use use §
use
loads and then imports from a compunit at compile time. It will look for files that end in .rakumod
. See here for where the runtime will look for modules.
use MyModule;
This is equivalent to:
need MyModule; import MyModule;
See also selective importing to restrict what you import.