lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Fri, Nov 28, 2008 at 2:25 PM, Sam Roberts <> wrote:
The above seems the simplest solution. I assume you don't like it
because if forces you to require"Utils" even if nobody ever uses it?

If that is a concern, replace the global require function with one
that calls the original, and them modifies the module
(if you wish) before returning it. This essentially allows you to
insert code in between the loaded codes require"Utils" and their use

This is perfect. It is working great. Thanks so much for the help.