lua-users home
lua-l archive

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


Petite Abeille <petite.abeille@gmail.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?
>
> load?
>
> 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
nicer.

-Miles

-- 
The trouble with most people is that they think with their hopes or
fears or wishes rather than with their minds.  -- Will Durant