[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Putting version information, description, copright into modules
- From: "Pierre Chapuis" <catwell@...>
- Date: Thu, 11 Feb 2016 17:29:25 +0100
> On Thursday, February 11, 2016 at 10:26AM, Soni L. wrote:
>> On 11/02/16 10:25 AM, Dirk Laurie wrote:
>> >No censorshop: LuaRocks can still accept any module via the present
>> >uploading protocol. Only, if they're nonstandard they can be installed
>> >but re not on the good guys list.
>> >
>> What about modules which return functions?
>
> I'm not sure what you mean: modules can return *both* functions and items
> like __AUTHOR = "Terrific Coder". All of mine do.
I think he's talking about modules that return a function instead of a table.
For instance, a module you use like this:
(require "m")(arg1, arg2)
My answer to that is: don't return a function, return a table with a
__call metatable.
--
Pierre Chapuis
- References:
- Putting version information, description, copright into modules, Marc Balmer
- Re: Putting version information, description, copright into modules, Daniel Silverstone
- Re: Putting version information, description, copright into modules, Jonathan Goble
- Re: Putting version information, description, copright into modules, Dirk Laurie
- Re: Putting version information, description, copright into modules, Soni L.
- Re: Putting version information, description, copright into modules, Peter Aronoff