[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: creating a new module as an extention of another module
- From: Mildred <ml.mildred593@...>
- Date: Fri, 31 Mar 2006 16:59:28 +0200
you can try :
-----------------------
local _G = _G
module("completeRule", function(m)
getmetatable(m).__index = require("rule")
return m
end)
function additionalRule(something)
return _G.print(something)
end
------------------------
or :
-----------------------
module("completeRule", package.seeall, function(m)
for k, v in require("rule") do
m[k] = v
end
return m
end)
function additionalRule(something)
return print(something)
end
------------------------
--
Mildred <xmpp:mildred@jabber.fr> <http://mildred632.free.fr/>
Clef GPG : <hkp://pgp.mit.edu> ou <http://mildred632.free.fr/gpg_key>
Fingerprint : 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]