[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Is it possible to test local funtion with lunit?
- From: Elias Barrionovo <elias.tandel@...>
- Date: Thu, 31 Jul 2014 11:00:22 -0300
On Thu, Jul 31, 2014 at 2:23 AM, Dirk Laurie <email@example.com> wrote:
> What I have done in some of my modules is to make them
> return two values. Then `require "mymod"` only accesses the
> public part, but `mymod, private = dofile"mymod.lua"` also
> returns a table containing some local functions, cached
> while they were visible.
Wow, that's very elegant! I shall be stealing this trick. =)
() - www.asciiribbon.org
/\ - ascii ribbon campaign against html e-mail and proprietary attachments