lua-users home
lua-l archive

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


On Tue, May 25, 2004 at 09:46:41AM +0200, Maxime Petazzoni wrote:
> Is there a way of loading a piece of code so that its variables are 
> available (as if it was a sort of configuration file), but without 
> executing the code ?

Loadfile does not execute the file but returns a function that you
can call to execute. So, just change the environment of that function
with setfenv to have the proper restrictions before calling it.

-- 
Tuomo