lua-users home
lua-l archive

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


Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> writes:
>> It is a pity though that trusted config file loading would have to use
>> debug library now... I understand that load{file/string} would not be
>> affected by "in" construction. Am I right?
>
> There'll be a new function, loadin:
> 	http://lua-users.org/lists/lua-l/2010-01/msg00179.html
>
> So, no need to use the debug library.

I've found the split between actual loading and setfenv useful -- e.g.,
it lets you evaluate a loaded file in different contexts.  It seems that
you're going to have to define multiple new load functions (not just
but "loadfilein", "loadstringin", ...); isn't just having a single
setter nicer?

Also, what about getfenv?  It currently allows a lua function to copy
its caller's environment, which is useful for e.g., writing an
"include()" function.

-Miles

-- 
We live, as we dream -- alone....