lua-users home
lua-l archive

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


On Tue, Aug 12, 2014 at 2:48 PM, Axel Kittenberger <axkibe@gmail.com> wrote:
> sed -i "s/\b[_G]\b/[_ENV]/g" *.lua

Ah, but that's not a correct substitution - _ENV starts out as _G, but
may change.  For the idiom where one's doing _G.print in a module with
new _ENV the fix would be the 'local _G = _ENV' at the top that was
suggested.

But really, why?  This mania for deprecation puzzles me.