diff src/luan/modules/http/tools/Shell_mod.luan @ 1088:bae2d0c2576c

change module naming convention
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 26 Dec 2016 22:29:36 -0700
parents e2eb55d86bb2
children 21d157b153fe
line wrap: on
line diff
--- a/src/luan/modules/http/tools/Shell_mod.luan	Mon Dec 19 01:38:21 2016 -0700
+++ b/src/luan/modules/http/tools/Shell_mod.luan	Mon Dec 26 22:29:36 2016 -0700
@@ -8,12 +8,12 @@
 local Http = require "luan:http/Http.luan"
 
 
-local M = {}
+local Shell_mod = {}
 
 local history = {}
-M.env = {}
+Shell_mod.env = {}
 
-function M.respond()
+function Shell_mod.respond()
 	if Http.request.parameter.clear ~= nil then
 		Http.clear_session()
 		Http.response.send_redirect(Http.request.path)  -- reload page
@@ -33,10 +33,10 @@
 					local line
 					try {
 						function()
-							line = load("return "..cmd,"<web_shell>",M.env)
+							line = load("return "..cmd,"<web_shell>",Shell_mod.env)
 						end
 						catch = function(e)
-							line = load(cmd,"<web_shell>",M.env)
+							line = load(cmd,"<web_shell>",Shell_mod.env)
 						end
 					}
 					print( line() )
@@ -103,6 +103,6 @@
 <%
 end
 
-Http.per_session(M.respond)
+Http.per_session(Shell_mod.respond)
 
-return M
+return Shell_mod