From: Trans Date: 2005-09-29T14:26:44+09:00 Subject: Re: require namespaces My require namspaces idea worked pretty well. It allows one to free the organization of your libs from how the end-user will interface with them. For example: mylib/ foo/ scriptA.rb bar/ scriptB.rb Then $LOAD_SPACE['myspace'] = [ 'mylib/foo', 'mylib/bar' ] require 'myspace:scriptA.rb' => true Then I refined it so this works too: require 'myspace/scriptA.rb' The other thing it does is that scriptA.rb and scriptB.rb (or any other scipt within the same namespace) can require another withput specifying the location, ie. scriptA.rb: require 'scriptB.rb' No need for 'myspace/script2.rb'. This works as long as scriptA.rb is required with a defined namespace. So all was well and wonderful, but then a nastye problem crept up -- I couldn't run one of these scripts on its own (like for testing purposes) b/c require's wouldn't be found. (i.e. the namespace isn't setup) Ugh! Back to the drawing board.... Well it took me awhile, but arrived at a solution. Next post... T.