Closed agentzh closed 12 years ago
Yeah, in redis.lua
we should return a table (the actual module), instead we set Redis
as a global variable which is actually not a good practice. This issue will definitely get fixed in the next major release, in the meanwhile I wonder if adding an additional return Redis
in redis.lua
might help. I don't want to remove the global Redis
yet to avoid breaking existing code until a new major release is out.
Finally fixed in master
, this change will be available starting from redis-lua v2.0.3. The Redis
global alias is still available for backwards compatibility but it has been deprecated and it will be removed in the next major version, so from now on you should always use:
local redis = require 'redis'
Thanks.
Thank you!
Best, -agentzh
The package name is "Redis" while the file name is "redis.lua", which breaks usage like below:
We'll get the error message: "attempt to index local 'Redis' (a boolean value)".
Hopefully you can do me a favor by fixing this ;)
Thanks! -agentzh