[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Versioning libraries
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 6 Aug 2009 18:31:18 -0300
> I'm trying to find a way to allow Lua to load different versions of a library but only one per process. [...] I'm probably going to rewrite the require function to enable this requirement.
require already does support versions albeit in an awkward way:
"Moreover, if the module name has a hyphen, its prefix up to (and
including) the first hyphen is removed. For instance, if the module name
is a.v1-b.c, the function name will be luaopen_b_c."
http://www.lua.org/manual/5.1/manual.html#pdf-package.loaders