On Thu, Jul 06, 2006 at 05:39:45PM -0700, jerry gay wrote:
> am i silly to think that if i'm looking for globals from the current
> namespace, they're just as likely to be found closer to the namespace
> root, than further away? perhaps something like
> 
>    .namespace [ 'Foo'; 'Bar' ]
>    $P0 = get_cur_global -1, 'x'     # [ 'perl5' ; 'Foo' ; 'x' ]
There's a technical reason for this omission.

The only way to get to namespace '..' (using the Unix analogy) is to ask the
namespace for its parent, and I don't want to do that.  Given the presence of
namespace aliasing, a namespace isn't guaranteed to have a single parent, or
that that parent will be the one it was, er, born with.

The compiler knows the full name and it's easy enough for the compiler to
strip the last element off the namespace path.
-- 
Chip Salzenberg <[EMAIL PROTECTED]>

Reply via email to