lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Aug 8, 2010 at 12:26 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> >> myModule, myOtherModule = require('moduleM')
>> >
>> > Multiple return values are not supported by require as far as I know.
>>
>> Then perhaps it should? Of course, you can return a table as well.
>
> require can't return multiple values because it caches the value
> return by the module open function.
>

Could it not put the results in a new table, and unpack() them on
return? Or is that inefficient?

-- 
~Jonathan