[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: modules, require, magic
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 18 Oct 2011 09:59:08 +0200
On Tue, Oct 18, 2011 at 9:33 AM, Josh Simmons <simmons.44@gmail.com> wrote:
> Interestingly enough this is actually worse if you use module and they
> both name themselves 'dns' in which case the value of the global just
> depends on who got in last.
This is true, but it's more a social problem. Sean's solution seems a
little extreme but at least he takes namespacing seriously! And we
can always just ignore the global ;)
Personally, I'd declare myself as agnostic on the module() question.
It's dangers have been oversold, but personally I use the no-magic
style in public projects because then the code can integrate with any
other style, including sandboxed code.
(Moving Penlight away from module() was not trivial - can't do this
without a lot of tests, and the last problems only disappeared when I
started to use a global-checking script)
steve d.
- References:
- modules, require, magic, Eduardo Ochs
- Re: modules, require, magic, Javier Guerra Giraldez
- Re: modules, require, magic, Petite Abeille
- Re: modules, require, magic, Sam Roberts
- Re: modules, require, magic, David Manura
- Re: modules, require, magic, Mark Hamburg
- Re: modules, require, magic, Sean Conner
- Re: modules, require, magic, Josh Simmons
- Re: modules, require, magic, Josh Simmons