The setting of the modules env to the module table doesn't just make
it "easy" to export functions, it makes it easy to not care whether
the functions is exported or not within the module;
module(....)
local function do_that() end
... lots of code that uses do_that()
----
When I decide I want do_that() exported, because its super useful, I
just remove the local, and its all good.
Contrast with the simplest of the many 5.2 module definition
techniques:
local _M = {}
local function do_that() end
---[[ when this becomes
function _M.do_that() end
all the code below will break, so then I guess we define a local
alias, for backwards compat?
local do_that = _M.do_that -- LAME!
or we do a search and replace on the whole file, just because we now
export the function as part of the module?
]]
... lost of code that uses do that
return _M
------