diff http/src/luan/modules/http/run.luan @ 505:7bc63886d4f2

web page modules now return a function
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 21 May 2015 01:45:49 -0600
parents 92c3d22745b8
children 6e3f063b71b5
line wrap: on
line diff
--- a/http/src/luan/modules/http/run.luan	Thu May 21 01:09:35 2015 -0600
+++ b/http/src/luan/modules/http/run.luan	Thu May 21 01:45:49 2015 -0600
@@ -7,7 +7,6 @@
 local String = require "luan:String"
 local Html = require "luan:Html"
 
-local M = {}
 
 local function lines(s)
 	local matcher = s.gmatch "([^\n]*)\n|([^\n])+$"
@@ -49,7 +48,7 @@
 </html>
 <% end
 
-function M.respond()
+return function()
 	Io.stdout = Http.response.text_writer()
 	local code = Http.request.parameter.code
 	if code == nil then
@@ -78,5 +77,3 @@
 		end;
 	}
 end
-
-return M