include() should not be used by libraries because it will pollute the global
namespace. To discourage this behavior and bring Node more in-line with
the current CommonJS module system, include() is removed.
Small scripts like unit tests often times do want to pollute the global
namespace for ease. To avoid the boiler plate code of
var x = require("/x.js");
var foo = x.foo;
var bar = x.bar;
The function node.mixin() is stolen from jQuery's jQuery.extend. So that it
can be written:
node.mixin(require("/x.js"));
Reference:
http://docs.jquery.com/Utilities/jQuery.extendhttp://groups.google.com/group/nodejs/browse_thread/thread/f9ac83e5c11e7e87
It's broken in Python 2.4.4. One gets this message when trying to run
configure:
[...]
Checking for SYS_clock_gettime : ok
Checking for library rt : ok
Checking for function clock_gettime : ok
Checking for function nanosleep : ok
Checking for function ceil : ok
---- deps/udns ----
Traceback (most recent call last):
File "/path/to/node/tools/waf", line 148, in ?
Scripting.prepare(t, cwd, VERSION, wafdir)
File "/path/to/node/tools/.waf-1.5.8-3e327cd9534c48e6762f56fdb1332663/wafadmin/Scripting.py", line 102, in prepare
prepare_impl(t,cwd,ver,wafdir)
File "/path/to/node/tools/.waf-1.5.8-3e327cd9534c48e6762f56fdb1332663/wafadmin/Scripting.py", line 95, in prepare_impl
main()
File "/path/to/node/tools/.waf-1.5.8-3e327cd9534c48e6762f56fdb1332663/wafadmin/Scripting.py", line 130, in main
fun(ctx)
File "/path/to/node/tools/.waf-1.5.8-3e327cd9534c48e6762f56fdb1332663/wafadmin/Scripting.py", line 168, in configure
conf.sub_config([''])
File "/path/to/node/tools/.waf-1.5.8-3e327cd9534c48e6762f56fdb1332663/wafadmin/Configure.py", line 100, in sub_config
self.recurse(k,name='configure')
File "/path/to/node/tools/.waf-1.5.8-3e327cd9534c48e6762f56fdb1332663/wafadmin/Utils.py", line 391, in recurse
f(self)
File "<string>", line 82, in configure
File "<string>", line 48, in conf_subproject
File "/usr/lib/python2.4/shutil.py", line 111, in copytree
os.mkdir(dst)
OSError: [Errno 2] No such file or directory: '/sites/rabidlabs.net/sandboxes/m/public_html/projects/0909.node/node/build/default/deps/udns'
The problem is probably this:
http://mail.python.org/pipermail/python-bugs-list/2005-January/027118.html
As a solution I am copying 2.6's version of the function in.