util.envload

This small library abstracts the act of loading a piece of Lua code into a specific environment table.

envload(code, source, env)

Loads code from the string code into the environment env. source is a descriptive name used in errors. Returns a function to be called, or nil, error.

envloadfile(file, env)

Like envload(), except the the code is read from the file file.

 
doc/developers/util/envload.txt · Last modified: 2017/03/01 20:01 by Kim Alvefur