8.2 Load Path

The load_path Poke variable contains a list of directories separated by the colon character (:). When a module is loaded using the load construction, these directories are searched in sequential order for the file corresponding to the requested module.

Empty directory names and entries that do not name existing directories are ignored.

Some entries have special meanings:

%DATADIR%

This is interpreted as the system-wide datadir directory, that depends on the prefix where poke is installed.

For example, say you want to maintain .pk files in your ~/.poke.d directory. You will probably want to add that directory to the load_path, when poke initializes. A way to do that is to add a command like this to your pokerc file:

load_path = getenv ("HOME") + "/.poke.d:" + load_path

If the environment variable POKE_LOAD_PATH is defined in the environment, its value is added to load_path at poke startup time.