[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Conceptual problem with module
- From: "Greg Falcon" <veloso@...>
- Date: Mon, 24 Apr 2006 20:36:52 -0400
On 4/24/06, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> > The trouble I have is the fact that the module function adds the module
> > name to the global table.
>
> How about redefining 'module'? Something like this (untested):
>
> do
> local _module=module
> module=function(name,...)
> local v=_G[name]
> _module(name,...)
> _G[name]=v
> end
> end
I think in that case, _module would change the environment of your
temporary function, not the function that is calling your wrapper.
Greg F