[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: setting _ENV in Lua 5.2 when loading a file...?
- From: Miles Bader <miles@...>
- Date: Thu, 10 Nov 2011 19:48:08 +0900
Petite Abeille <email@example.com> writes:
>> Ok, now that _ENV replaces setfenv etc, how is one supposed to load a
>> file into a particular environment in Lua 5.2?
> It takes an environment in 5.2:
> load (ld [, source [, mode [, env]]])
Yeah, but as I mentioned, "load" is kind of annoying to use; having
"loadfile" take an (optional) environment parameter would be much
The trouble with most people is that they think with their hopes or
fears or wishes rather than with their minds. -- Will Durant