lua-users home
lua-l archive

lua source as config file

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I am sure this must have come up before but failed to
search it through google etc.
at the moment, my relatively ugly solution is just
this :
dofile("my_config.lua")
where my_config.lua is like this :
my_config={ ... all sorts of embedded table ...}
This however pollute the namespace. What I want is to
do something like this(imaginary):
in my program:
local my_config=dofile("my_config.lua")
where the same table is created but not polluting the
name space.
 
____________________________________________________________________________________
Have a burning question? 
Go to www.Answers.yahoo.com and get answers from real people who know.

AltStyle によって変換されたページ (->オリジナル) /