On Sat, 11 Jun 2005, Joel VanderWerf wrote:

>> that's very cool joel!  i did something with a similar intent, but slight
>> different impl, at
>> 
>>   http://raa.ruby-lang.org/project/dynaload/
>
> One difference: using script.rb, the loaded file doesn't have to know that
> it is being used in that way. The entire file (and its local dependencies)
> are encapsulated, rather than only the selected modules that you pass to
> Dynaload::export.

yes exactly.

> I like the #modules and #classes methods of Dynaload. Maybe I will borrow
> that for Script instances. Maybe they should even be instance methods of
> Module.

take what you like!

> It might make sense to propose something like these two libraries as RCRs,
> since so many people either ask for it or reinvent it, but the
> implementation is so easy that it's probably not worth it...

on the other hand tons of the built-in libs are really quite simple - it's
what makes them re-usable and more or less bug free ;-)

cheers.


-a
-- 
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| My religion is very simple.  My religion is kindness.
| --Tenzin Gyatso
===============================================================================