[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.2 news
- From: steve donovan <steve.j.donovan@...>
- Date: Fri, 19 Feb 2010 09:36:25 +0200
On Thu, Feb 18, 2010 at 11:48 PM, Geoff Leyland
<geoff_leyland@fastmail.fm> wrote:
>> local env = {}
>> local f = assert (loadfile ("config.lua"))
>> setfenv (f, env) ()
>>
>> ... which lets you load a configuration file into a table, will no longer work under Lua 5.2.
>
> I do exactly this too. It'd be a shame if 5.2 broke it.
Do remember that loadin can also be passed a code string (like
loadstring) but then I guess you still have to have io.read().
Although surely this is not the kind of thing you would do in a sandbox?
steve d.