Re: Setting namespace in loaded files



On Wed, 23 Aug 2006, Luke Kanies wrote:

If you read the file, and then eval it in the desired scope, it has the effect of loading it into that scope.

Hmmm. That complicates things a little, since I need to iterate through $: myself, but it seems like about the only way.

It can be made to work. I do a lot of this sort of dynamic loading with no problems. Write yourself a method that iterates through your search path, and write one that loads and evals a file into a specific scope, and it should come together all right for you.


Kirk Haines


.



Relevant Pages

  • RE: table datatype in EXEC string
    ... and variables have scope. ... exec usp_mySP 'customers' ... > loading the table from a number of insert/select statements in the sp before ... > The sp is being called from sql reporting services and is loading a matrix. ...
    (microsoft.public.sqlserver.programming)
  • Re: Setting namespace in loaded files
    ... method search path started at the scope doing the loading? ... If you read the file, and then eval it in the desired scope, it has the ... effect of loading it into that scope. ...
    (comp.lang.ruby)
  • Re: multimeter protocol
    ... when I hooked up the scope the additional loading was already too much ... wouldn't work with an extra port either, ... thought the 50 us were glitches as well, ...
    (sci.electronics.design)
  • Re: Setting namespace in loaded files
    ... On Tue, 22 Aug 2006, Luke Kanies wrote: ... method search path started at the scope doing the loading? ... If you read the file, and then eval it in the desired scope, it has the effect of loading it into that scope. ...
    (comp.lang.ruby)
  • Re: Setting namespace in loaded files
    ... method search path started at the scope doing the loading? ... If you read the file, and then eval it in the desired scope, it has the ... effect of loading it into that scope. ...
    (comp.lang.ruby)