starwing/luaposix — comment on commit b6486c3e27d2d7108323772d5f4ffc683cb3c86e
File:  line 0
By rrthomas:

Thanks very much for this.

As it stands, it does not work as expected in Lua 5.1, i.e. require "curses" no longer sets up a module "curses". Please could you make this happen (only for Lua 5.1)? I suggest that you test the version of Lua, and call the "module" function for Lua 5.1, and use your replacement code for 5.2.