Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Absolute module names

Relative module names are simple, but lack the ability to point upwards in the directory heirarchy.

For example, suppose you want to organize a set of Raptor files like so:

~/project/base.rapt
~/project/hostname.rinc
~/project/target/common.rapt
~/project/target/frontend.rapt
~/project/target/database.rapt
~/project/lib/utils/tools.rinc

The base layer can INCLUDE hostname, but the frontend and database targets have no way to specify they want to build FROM the base layer!

This is where absolute module names are useful.

By prefixing a name with $. (dollar + dot) the name refers to the root of the current package.

We will go into more detail of what a package is, in the next section. For now, it is enough to know that when invoking raptor on a target, the root for that target is the directory that raptor was started from.

StatementSource fileResulting path
FROM $.basetarget/frontend.raptbase.rapt
FROM commontarget/frontend.rapttarget/common.rapt
FROM $.target.commontarget/frontend.rapttarget/common.rapt
INCLUDE $.lib.utils.toolstarget/database.raptlib/utils/tools.rapt