[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.2 and 5.1
- From: Miles Bader <miles@...>
- Date: Tue, 09 Apr 2013 14:20:45 +0900
Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> writes:
> For 5.1 libraries written in Lua, the only difficulty will be dealing
> with setfenv. Ideally this should be handled by rewritten them using the
> new _ENV mechanism or using the new env arg in load.
.... and even that maybe not so difficult... :]
When I added 5.2 support to my code, I realized I was _always_ using
load+setefenv in pairs (even when sometimes they were separated by
quite a bit of other code), although I never intentionally did so, and
that it wasn't hard to make sure the environment was available at
load-time and pass it in to load (5.1 load will just ignore it of
course). Sometimes a little refactoring was required, but this tended
to make the code clearer anyway....
-miles
--
雨上がり に歩いて、風 柔らかい