On Sun, Dec 25, 2011 at 1:53 PM, Hisham <[email protected]> wrote:
> Instead of adding a setfenv replacement, it's better to reimplement
> persist.load_into_table in terms of load().

True, that would be better style.  Moreover, a 5.2-style load()
function is available in 5.1 [1].

> "if _VERSION == 'Lua 5.2'"

The `_VERSION == "Lua 5.2"` is hackish.  That almost certainly will
break in 5.3.  A likely forward compatible test would be `_VERSION ~=
"Lua 5.1"`, although that will break 5.0 (not that anyone cares).
Even better, test capabilities rather than version numbers, like in
[1].

[1] http://lua-users.org/lists/lua-l/2012-01/msg00584.html

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to