Re: lua source as config file
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: lua source as config file
- From: PA <petite.abeille@...>
- Date: Thu, 8 Feb 2007 20:31:44 +0100
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?