lua-users home
lua-l archive

Re: lua source as config file

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


On Feb 08, 2007, at 20:12, Luiz Henrique de Figueiredo wrote:
No need to read the file into memory:
I was wondering if it could be possible to write it as a one liner...
function config( aPath )
 local aChunck = setfenv( loadfile( aPath ), {} )
 return getfenv( aChunck, aChunck() )
end
Thoughts?

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