lua-users home
lua-l archive

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


On 15/08/2013 10.51, Daniel Silverstone wrote:
I'm well known for doing "unusual" things with my code.  In particular I do a
lot of function environment related stuff.  I do not believe there is a
consistent way at the moment to provide "5.1 standard" setfenv semantics to 5.2
pure Lua code.  I could be wrong, but the large amount of discussion
surrounding it has confused me, and quite honestly worried me.  Perhaps you can
point me at a "porting to 5.2" document I could use to help me understand the
transition?

IIRC, Luiz posted some examples of how to use an _ENV local variable to more or less emulate setfenv behaviour. I'm sure I saved it somewhere...
(if you search with my name and setfenv, you'll probably find the thread).

--
  Enrico