[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: _ENV vs _G
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 12 Aug 2014 14:53:25 +0200
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.