[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to overwrite a function that is late-loaded using loadfile()
- From: "RJP Computing" <rjpcomputing@...>
- Date: Fri, 28 Nov 2008 15:24:39 -0500
On Fri, Nov 28, 2008 at 2:25 PM, Sam Roberts <firstname.lastname@example.org>
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.