lua-users home
lua-l archive

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




On Wed, Jul 21, 2010 at 9:09 PM, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> I think you're trying to use LuaSocket, so the first line is:
>
> local smtp = require 'socket.smtp'

But why did he not get an error from require"smtp" ?

I'm not sure if this is connected, but I installed the Debian liblua5.1-socket2 package, which installs smtp.lua in /usr/share/lua/5.1/socket/, but by default Lua did not look in that directory for libraries. I did not know how to do the Perl equivlant of a BEGIN { push @INC, "/usr/share/lua/5.1/socket"; } in Lua, so I just copied smtp.lua into /usr/local/share/lua/5.1/ which was in the path. Perhaps that is connected.

- J