. Elvis <[email protected]> [2012-12-03 10:28:25]:
> Hi all,
>
> when i add above
>
> 'print("hello")' in /usr/lib/lua/luci/model/uci.lua
You need to define it first at the top of the file:
diff --git a/libs/core/luasrc/model/uci.lua
b/libs/core/luasrc/model/uci.lua
index a394563..f513c77 100644
--- a/libs/core/luasrc/model/uci.lua
+++ b/libs/core/luasrc/model/uci.lua
@@ -27,6 +27,7 @@ local os = require "os"
local uci = require "uci"
local util = require "luci.util"
local table = require "table"
+local print = print
Why? It's because of the following function call:
module "luci.model.uci"
For the details, read the fine Lua manual[1]. BTW, it's better to use file for
debugging output, since you can easily loose some hairs with stdout/stderr
debugging in the Luci development :-)
1. http://www.lua.org/manual/5.1/manual.html#pdf-module
-- ynezz
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel