I think a heirarchy is a good idea for namespacing in general.  I've
always wanted to be able to tie namespaces in Perl 5.  It would only
make sense that if I tie Foo::, that Foo::anything:: would also go
through that tie to get the anything:: stash.

What do you mean by "tie" here? Are you talking about namespace aliasing, so that I can alias "Foo" to "A::B::C::D::E", so that I can say "Foo::bar" rather than "A::B::C::D::E::bar"? If so, it seems that this would work with or without a hierarchical structure. Definitely useful, though.

Tying a namespace will involve allowing a namespace to basically hide
its implementation, have a custom lookup routine, back-store its symbols, etc.
I might tie a namespace to an Oracle database, so a lookup is really a callout to
database code.


my $foo = Oracle::Instance::DEV1::db_block_buffers;

The namespace lookup in Oracle::Init checks the Oracle config parameters
which is external code.

All sorts of neat possibilities. :)

-Melvin




Reply via email to