$ luarocks install hotfix
hotfix reload the module and update the old module, keeping the old data.
Usage:
local hotfix = require("hotfix")
hotfix.hotfix_module("mymodule.sub_module")
hotfix_module() uses package.searchpath(module_name, package.path)
to search the path of module.
The module is reloaded and the returned value is updated to package.loaded[module_name].
hotfix_module() will skip unloaded module to avoid unexpected loading.
Functons are updated to new ones but old upvalues are kept.
Old tables are kept and new fields are inserted.
All references to old functions are replaced to new ones.
Versions
Dependencies
lua >= 5.2