ソースを参照

Add debug print to lua_preload example file

bel2125 7 年 前
コミット
3a84b59572
1 ファイル変更12 行追加1 行削除
  1. 12 1
      test/preload.lua

+ 12 - 1
test/preload.lua

@@ -69,9 +69,20 @@ SAPI.Response.write = function(...)
 end
 
 
+-- Debug helper function to print a table
+function po(t)
+  print("Type: " .. type(t) .. ", Value: " .. tostring(t))
+  if type(t)=="table" then
+    for k,v in pairs(t) do
+      print(k,v)
+    end
+  end
+end
+
 -----------------------------------------------------
 
 
 -- Use cgilua interface
-require "cgilua"
+-- require "cgilua"
+