On Tue, Apr 18, 2006 at 05:14:30PM +0200, Leopold Toetsch wrote: > Will Coleda wrote: > >Here's another potential NS issue. It looks like find_global is being > >affected by the .namespace directive: > > Yes. It sets the current namespace below the HLL namespace. > I think, this is the specced and correct behavior.
I think it's correct, though I don't remember speccing it. :-) By analogy: Suppose your Unix working directory is "/tmp". The reason that it's a feature (rather than a bug) that open("foo") opens "/tmp/foo" is a that you can easily defeat the default directory with a full absolute path. I think Leo's default root and Will's overriding it for his current code are both the right thing. All we need is to consider which root overrides are going to be needed and provide convenient ways to do them, rather than the current awkward work-up-from-namespace-root thing. How about: find_global ['name'; 'space'], '$var' # from HLL root find_global [], '$var' # *at* HLL root Or a two step version -- more flexible but a bit less convenient: $P0 = get_namespace ['name'; 'space'] # from HLL root find_global $P0, '$var' $P1 = get_namespace [] # *at* HLL root find_global $P1, '$var' -- Chip Salzenberg <[EMAIL PROTECTED]>