Kent Dahl wrote:

> Kent Dahl wrote:
> 
>>I have an idea what is going on, but I'm going to investigate a bit
>>more, just in case I'm sticking my foot in my mouth. But for now, I'm
>>getting
>>  /home/httpd/html/ruby/test/testscr.rbx:10:
>>  undefined method `testfunc' for
>>  #<Module 0lx2aead188>::TestMod (NameError)
>>and the nameless module before TestMod makes me think that mod_ruby is
>>wrapping the loaded code, to avoid it cluttering the namespace of other
>>mod_ruby programs? And this might confuse you (and Ruby) with regards to
>>just which TestMod you are accessing.
>>
> 
> Which retorts "---60 vs 61---" to me. It seems like the load of the
> script is wrapped in the nameless module, but anything that script
> requires or loads goes to the toplevel non the less. Still haven't found
> the source in mod_ruby that does this, but I'm convinced :-)


That's the conclusion I came to here, that the first script is in an 
anonymous namespace and the loaded module seems to be in another 
namespace altogether...guess it's time to report that.  I just switched 
to having my scripts executed as CGI programs using command-line ruby. 
mod_ruby has some fundamental things I don't like about it, like not 
being able to completely clean up the interpreter between uses.  Between 
that feature and Ruby's garbage collection system, preserving resources 
seems to be a forgotten relic of ancient programming techniques or 
something.  I wish there was more focus on making things clean and tight.

	Sean