Finding a module for your needs§

The quick way to find modules from the command line is by using zef search:

zef search WWW

will return a list of modules that includes WWW in their name, for instance.

Modules are listed in the Raku ecosystem and can be searched there. This is particularly useful when the quick search doesn't come up with exactly one hit.

Installing the module§

zef is the application used for installing modules in Raku.

zef install WWW

will install the module with that particular name, if it is not already installed [1] .

Finding installed modules§

It is up to the module installer to know where compunit expects modules to be placed. There will be a location provided by the distribution and in the current home directory. In any case, letting the module installer deal with your modules is a safe bet.

cd your-module-dir
zef --force install .

A user may have a collection of modules not found in the normal ecosystem, maintained by a module or package manager, but needed regularly. Instead of using the use lib pragma one can use the RAKULIB environment variable to point to module locations. For example:

export RAKULIB=/path/to/my-modules,/path/to/more/modules

Note that the comma (',') is used as the directory separator.

The directories in the RAKULIB path will be searched for modules when Raku needs, uses or requires them. Directories that start with a dot are ignored and symlinks are followed.

To avoid performance penalties at module load time, you may need to ensure that directories added to this path are not too large; see here for more information.

1 [↑] If it's installed, it will reinstall only if the version of the module is newer than the one installed