evanwebb / gmail.com wrote:
> The "safety" of this is probably debatable, and I believe so is the use
> of alias to solve it. If we have many different librarys changing
> require or other core methods, then there is bound to be some problems
> eventually. Thats why I wrote maskable.rb, which allows classes to have
> there methods masked by other versions of the method. That way, other
> implementations of the method can run before the original and can
> decide if they are done with the operation, or if the next
> implementation should run.
>
> The source is at http://hoshi.fallingsnow.net/svn/maskable/maskable.rb.
>
> Feel free to use it as you wish.

[Sorry I hadn't gone to this sooner].

I must say Evan, I am very impressed by your coding ability. You've
managed to write a very unique, threaded aop-style method wrapping
mechinism. There's quite a bit of expert ruby code techinques in there.
Yet in this instance I think it may be a case of "too smart for one's
own good" ;-) That is too say, I think this is a more than the problem
at hand really requires. I agree with you though, method wrapping would
be the most appropriate way to address augmenting #require, but only if
Ruby supported it natively. I have a number of variant wrapping
mechinisms on file (I've done a lot of AOP for Ruby research), but they
all generally add too much "code-weight" for most uses.

Thanks for the code peek though. I am interesed in AOP wrapping
techinques so having a look at your appraoch was interesting.

T.