Prev: Next: Up: Global directives[Contents][Index]


10.4.8 The Lua statement

Global Lua settings reside in Lua section:

Lua
   ...
End

Following statements are allowed for use in this section:

Lua directive: Load "filename"

Load Lua source file filename in per-thread mode. Unless specified as an absolute pathname, the file will be looked in the include directory (see include directory).

Lua directive: LoadGlobal "filename"

Load Lua source file filename in global mode. Unless specified as an absolute pathname, the file will be looked in the include directory (see include directory).

Lua directive: Path "path"

Prepend path to the Lua package.path. This is a semicolon-delimited list of patterns that specifies where the Lua require statement searches for Lua sources. In patterns, the question mark serves as a wildcard and will be replaced by the name of the module being loaded. The path is scanned from left to right.

Multiple Path statements are allowed. After parsing, the values from all Path statements are joined into a single prefix, which is then prepended to the default value of package.path.

Lua directive: CPath "path"

Similar to Path (see above), but modifies package.cpath, a variable that controls where Lua looks for shared libraries.