Module dotmod

Relative imports with require() for pure Lua modules.

Info:

  • Copyright: 2018
  • License: MIT
  • Author: un.def

Tables

package_modnames A set of modnames that seem to be packages.

Local Functions

get_requiring_modname () Get the absolute name (foo.bar.baz) of the module that is require()'ing.


Tables

package_modnames
A set of modnames that seem to be packages. That is, if foo.bar resolves to foo/bar/init.lua, then this table will contain ["foo.bar"] = true entry.

Local Functions

get_requiring_modname ()
Get the absolute name (foo.bar.baz) of the module that is require()'ing. The function inspects the call stack for the nearest function (chunk) with __name local variable and returns its value.

Returns:

    absolute name on success, or nil and a string describing the error otherwise.
generated by LDoc 1.4.6 Last updated 2018-09-05 10:42:44