Mercurial Hosting > luan
diff http/src/luan/modules/http/shell.luan @ 503:92c3d22745b8
make _ENV optional
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 20 May 2015 23:24:46 -0600 |
parents | 55f9f74f1e55 |
children | dbdf4b8193a8 |
line wrap: on
line diff
--- a/http/src/luan/modules/http/shell.luan Tue May 19 17:57:20 2015 -0600 +++ b/http/src/luan/modules/http/shell.luan Wed May 20 23:24:46 2015 -0600 @@ -8,12 +8,14 @@ local Http = require "luan:http/Http" local Html = require "luan:Html" -per_session = true +local M = {} + +M.per_session = true local history = {} -env = {} +M.env = {} -function respond() +function M.respond() if Http.request.parameter.clear ~= nil then history = {} else @@ -28,7 +30,7 @@ print( "% "..cmd ) try { function() - local line = load(cmd,"<web_shell>",env,true) + local line = load(cmd,"<web_shell>",M.env,true) Debug.print_if_something( line() ) end; catch = function(e) @@ -66,3 +68,5 @@ </html> <% end + +return M