diff --git a/src/redis.lua b/src/redis.lua index 98b4710..fcd6da3 100644 --- a/src/redis.lua +++ b/src/redis.lua @@ -4,10 +4,12 @@ local redis = { _COPYRIGHT = 'Copyright (C) 2009-2012 Daniele Alessandri', } --- The following line is used for backwards compatibility in order to keep the `Redis` --- global module name. Using `Redis` is now deprecated so you should explicitly assign --- the module to a local variable when requiring it: `local redis = require('redis')`. -Redis = redis +if EXPORT_GLOBAL then + -- The following line is used for backwards compatibility in order to keep the `Redis` + -- global module name. Using `Redis` is now deprecated so you should explicitly assign + -- the module to a local variable when requiring it: `local redis = require('redis')`. + Redis = redis +end local unpack = _G.unpack or table.unpack local network, request, response = {}, {}, {}