1 local os
= require("os")
2 local old_require
= require
3 if os
.getenv('LUA_OLD_INIT') then
4 local loadstring
= loadstring
or load
5 assert(loadstring(os
.getenv('LUA_OLD_INIT')))()
7 require("luarocks.require")
9 local luarocks_require
= require
11 function require(module
, ...)
12 if module
== "json" or module
:match("^json%.") then
13 return old_require(module
, ...)
15 return luarocks_require(module
, ...)