[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Non-uniqueness of module names
- From: Sean Conner <sean@...>
- Date: Mon, 15 Apr 2019 17:22:47 -0400
It was thus said that the Great Luiz Henrique de Figueiredo once stated:
> > Assuming a specific use at the OP's, namely to tell different
> > modules of the same name apart, it's more reliable to test
> > versions
> My modules contain a "version" field that can be used for that.
> If only module writers could agree to have that field and on what is
> inside it...
Perhaps the version number that matches the LuaRocks version? As an
example, for the rockspec "org.conman.syslog-2.1.3-3.rockspec", the version
inside would be _VERSION = "2.1.3".
That's fine for modules that return a table of functions (which is
probably 90% of all modules). But not all modules need be a table (all the
modules under org.conman.parsers are LPEG expressions).