Utils.Globals module

Additional lua globals

Functions

inline_if(exp, t, f) Returns t if the expression is true.
install.math() Install the Math library into global math
install.reload() Reload a module
install.string() Install the string library into global string
install.table() install the Table library into global table
prequire(module, suppress_all) Require a file that may not exist
rawtostring(t) Temporarily removes __tostring handlers and calls tostring

Functions

# inline_if(exp, t, f)

Returns t if the expression is true.

f if false

Parameters:
  • exp : (mixed) The expression to evaluate
  • t : (mixed) the true return
  • f : (mixed) the false return
Returns:
# install.math()

Install the Math library into global math

# install.reload()

Reload a module

# install.string()

Install the string library into global string

# install.table()

install the Table library into global table

# prequire(module, suppress_all)

Require a file that may not exist

Parameters:
  • module : (string) path to the module
  • suppress_all : (boolean) suppress all errors, not just file_not_found
Returns:
  • (mixed)
# rawtostring(t)

Temporarily removes __tostring handlers and calls tostring

Parameters:
  • t : (mixed) object to call rawtostring on
Returns: