[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua registry, environment, and threads.
- From: Alexander Gladysh <agladysh@...>
- Date: Sat, 9 Jan 2010 23:40:57 +0300
<...>
> Alternative solution:
> I understand that you want the module-loading function to be called
> "module", while limiting backward compatibility issues. What if you call the
> old module function, say, legacy_module(), and add in base lib the
> equivalent of:
> function package.preload.module51() module=legacy_module end
> This way, adding a single 'require "module51"' at the beginning of an
> application makes all indirectly required modules lua 51 compatible. You can
> even do it from the command line with "lua -lmodule51 ...".
I like this. This actually looks like a good idiom for providing
backwards compatibility options without forcing user to recompile the
interpreter.
Alexander.
- References:
- Re: Lua registry, environment, and threads., Christian Tellefsen
- Re: Lua registry, environment, and threads., Patrick Donnelly
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- Re: Lua registry, environment, and threads., Mike Pall
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- Re: Lua registry, environment, and threads., Mike Pall
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- Re: Lua registry, environment, and threads., Enrico Tassi
- Re: Lua registry, environment, and threads., Roberto Ierusalimschy
- Re: Lua registry, environment, and threads., Fabien