[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Nested mobules
- From: <stukov@...>
- Date: Sat, 21 May 2005 11:09:31 -0000
Hello All!
Is it posible to create nested modules using lua 5.1w6 ?
For example:
mainmodule.lua
-----------------------------
require("moduleA")
require("moduleB")
print(moduleA.space.variable)
print(moduleB.space.variable)
------------------------------
moduleA.lua
-----------------------------
module(...)
require("spaceA")
-----------------------------
moduleB.lua
-----------------------------
module(...)
require("spaceB")
-----------------------------
spaceA.lua
-----------------------------
module("space")
variable="spaceA"
-----------------------------
spaceB.lua
-----------------------------
module("space")
variable="spaceB"
-----------------------------
output:
spaceB
spaceB
but i need
spaceA
spaceB
____________________________________________________________
Бесплатная почтовая служба Gala Mail - http://mail.gala.net/
WEB, WAP и POP3 доступ, мощные фильтры и защита от спама.