Lloyd Zusman schrieb:

>Actually, I now realize that I don't need a bona fide named module, but
>rather, just a way to associate a name with a module.  Therefore, I
>think that I can do it more or less like this:
>
>  modhash = Hash.new
>  if fname then
>    if modhash.has_key?(fname) then
>      mod = modhash[fname]
>    else
>      mod = Module.new
>      modhash[fname] = mod
>    end
>    data = File.new(fname, 'r') do |f|
>             f.read
>           end
>    mod.module_eval data
>    mod.send :init, args
>  end
>
>Does this make sense?
>
>
>  
>
You can also use MyNameSpace#const_get
with a rescue clause

/Christoph