Module util.safe
Protects the global table from writes and misses.
Emits a warning whenever one tries to read from or write to an unset key
in the global table _G
.
require "util.safe" print(foo) --> Lua warning: unset global variable foo bar = 123 --> Lua warning: set global variable bar to 123