[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: should "require" return module/nil instead of true/false?
- From: "Guangxian Zou" <trueweck@...>
- Date: Wed, 28 Jun 2006 17:15:07 +0800
hi all
If there is a file a/b.lua:
--- begin
module("c.d")
function foo()
end
--- end
load this module with
require("a/b"); -- or require("a.b"), or require("a\\b")
will return true/false.
but require("c.d") will return the module loaded.
so there is ambiguity. I think require("a/b") should return module also when succeed, but return nil when faild.
do you think so ?
thanks
--
zou guangxian