Background

I'm playing around with merb, trying to add some infrastructure
for logging method calls, checking assertions, etc.  My basic
plan, at this point, is as follows:

  *  As soon as merb is run, walk ObjectSpace and record all of
     the classes and methods that are defined at this point.

  *  As soon as init.rb is run, walk ObjectSpace again and set
     up "wrapper" methods for every "added" method (ie, ones
     that were not recorded at start-up time).

     Also, set up a callback to set up a wrapper method for any
     method that gets added after this point.


Question

In order to get my code to run as early as possible, I have made
a copy of the merb script (my_merb), adding the following line:

  require 'config/bare' if File.file? 'config/bare.rb'

This works, but it conflicts with the notion of using public APIs,
rather then hacking up workarounds.  So, is there a better way
to get the effect I'm looking for?  If not, does this qualify as a
bug that should be reported?

-r
-- 
http://www.cfcl.com/rdm            Rich Morin
http://www.cfcl.com/rdm/resume     [EMAIL PROTECTED]
http://www.cfcl.com/rdm/weblog     +1 650-873-7841

Technical editing and writing, programming, and web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to