lua-users home
lua-l archive

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


On Tuesday, November 19, 2013 09:59:43 AM Sir Pogsalot wrote:
> local import =
>     function (t, ...)
>         require('debug')
  ..cut..
> 
>         debug.setupvalue(debug.getinfo(1, 'f').func, 1, new_env)
>     end
> 

Which only works when called from the top level of a loaded chunk. I consider 
an import that can't be used in a function to be less desirable.

-- 
tom <telliamed@whoopdedo.org>