From: why the lucky stiff Date: 2002-11-22T07:25:35+09:00 Subject: Re: install.rb: avoiding file name collisions (raa-install too) Phil Tomson (ptkwt@shell1.aracnet.com) wrote: > When there is potential for collisions in the namespace, we wrap > modules in other modules in order to avoid this, but how do we avoid the > problem of a library file (that contains a module definition) having > potentially the same name as an already existing library file? NaHi and I have been discussing this exact same issue for the last two weeks. You see the problem, too. Ruby itself has namespaces to assist in preventing name collision, but RAA does not. Currently there is an ID field and a descriptive name field to prevent collisions. I am working with NaHi to introduce a new canonical name. It's exactly what you're talking about. When you register your library in RAA, you'll be asked to disclose the top-level namespace for your module. This name will act as your canonical name across RAA and its mirrors. It will also park you a namespace that none can tread upon. (Though others may descend beneath your namespace, certainly.) > So here's a suggestion for a convention: Wherever you see a '::' in a > package name, it should imply a subdirectory within your package and > within Ruby's libraries: > > Text::Template -> 'text/template' One of these two representations will be used as the canonical name. I lean toward using the slash. > I see several XML* packages that should probably be changed to 'XML::*' > type names. Well, let's see. So should the namespacing reflect categorical information? Because it seems kinda redundant if REXML uses XML::REXML. I doubt there are any other packages competing for the top-level REXML namespace. > Does raa-install have any facility to search a namespace like: > raa-install --search XML::* ? raa-install --search "^XML" > BTW: I find that 'raa-install --search' doesn't work for me as advertised: > > $ raa-install --search xml That guide is a bit ahead of the releases. I just got access to CVS today, so the 0.0.5 release is on its way. _why