Fine tuning the "require" business.

This commit is contained in:
Diego Nehab
2004-05-30 21:36:22 +00:00
parent c23240726e
commit 5ca1049ab4
17 changed files with 133 additions and 116 deletions

View File

@ -9,10 +9,11 @@
require("socket")
-- get LuaSocket namespace
local socket = _G[LUASOCKET_LIBNAME]
-- create url namespace inside LuaSocket namespace
local url = socket.url or {}
socket.url = url
-- make all module globals fall into smtp namespace
-- make all module globals fall into url namespace
setmetatable(url, { __index = _G })
setfenv(1, url)