lua-users home
lua-l archive

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


On Sat, Feb 16, 2013 at 7:25 AM, Bas Groothedde <lua@xoru.net> wrote:
> Hi there list!
>
> I have migrated to a new server this week, and I obviously installed Lua,
> LuaRocks and aside from that
> the luasql-mysql module. Installation was going well, and if I use require
> "luasql.mysql"; no errors are
> thrown into the shell.
>
> The weird thing is, that it seems as if it isn't actually loading the
> module. There is no luasql object in
> lua after this require...
>
> The mysql.so file is in /usr/local/lib/lua/5.1/luasql/luasql/mysql.so
>
> Can anyone help me, or provide me with information what could be causing
> this?
>
> Cheers!
>
> --
> ________________________________
>
> Bas Groothedde
> Imagine Programming

It's considered good practice now for modules to not set any globals,
but return their objects. Try:
luasql = require "luasql.mysql"

-- 
Sent from my Game Boy.