lua-users home
lua-l archive

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


> I wish Lua had "env stacks"[1]

It does: use "local _ENV=" instead of setenv:

   local _ENV={print=print}
   print "normal stuff"
   do 
   	local _ENV= {print=function() 
   		print "not normal" 
   	end}
   	print()
   end
   print "normal stuff, again"