Mercurial Hosting > luan
diff src/luan/tools/WebRun.java @ 86:6db8f286fa6c
_ENV is per module, not global
git-svn-id: https://luan-java.googlecode.com/svn/trunk@87 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Wed, 27 Feb 2013 08:03:51 +0000 |
parents | 4bf3d0c0b6b9 |
children | 3c404a296995 |
line wrap: on
line diff
--- a/src/luan/tools/WebRun.java Mon Feb 25 03:53:54 2013 +0000 +++ b/src/luan/tools/WebRun.java Wed Feb 27 08:03:51 2013 +0000 @@ -10,6 +10,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import luan.LuanState; +import luan.LuanTable; import luan.LuanException; import luan.lib.HtmlLib; @@ -33,9 +34,10 @@ try { LuanState luan = newLuanState(); luan.out = out; - luan.global().put("request",request); - luan.global().put("response",response); - luan.eval(code,"WebRun"); + LuanTable env = luan.newEnvironment(); + env.put("request",request); + env.put("response",response); + luan.eval(code,"WebRun",env); } catch(LuanException e) { logger.error(null,e); response.reset();