lua-users home
lua-l archive

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


On Fri, 27 May 2022 16:04:56 +0200
Hugo Musso Gualandi <hgualandi@inf.puc-rio.br> wrote:

[snip]

> What I do on my projects: if the file is a standalone script I
> usually don't bother with creating a main function.  I the module
> is intended to be used via require, I put the code inside an
> exported function.   I don't want to have side effects when I
> call require("mymodule").

Thx! Very helpful.
--
Duke
** Bottom-posting, text-only is the netiquette way! **