Module code
An implementation of a subset of the Erlang/OTP code interface.
Function Index
all_available/0 | Return all modules available from loaded avm packs, in addition to loaded modules. |
all_loaded/0 | Return a list of all loaded modules. |
load_abs/1 | Load a module from a path. |
load_binary/3 | Load a module from a binary. |
Function Details
all_available/0
all_available() -> [{unicode:unicode_binary(), term(), boolean()}]
returns: A list of available modules, including loaded modules
Return all modules available from loaded avm packs, in addition to loaded modules. List of available modules may be incomplete if this function is called while a module is loaded. Result type differs from Erlang/OTP: names of modules is a binary (and not a string), and second term of tuples is currently unspecified
all_loaded/0
all_loaded() -> [{atom(), term()}]
returns: A list of all loaded modules
Return a list of all loaded modules. Result type differs from Erlang/OTP: second term of tuples is currently unspecified
load_abs/1
load_abs(Filename::string()) -> error | {module, module()}
Filename
: path to the beam to open, without .beams suffix
returns: A tuple with the name of the module
Load a module from a path. Error return result type is different from Erlang/OTP.
load_binary/3
load_binary(Module::module(), Filename::string(), Binary::binary()) -> error | {module, module()}
Module
: name of the module to loadFilename
: path to the beam (unused)Binary
: binary of the module to load
returns: A tuple with the name of the module
Load a module from a binary.
Error return result type is different from Erlang/OTP.
Also unlike Erlang/OTP, no check is performed to verify that Module
matches the name of the loaded module.