On Tue, 3 Sep 2002, Per Einar Ellefsen wrote:

> At 22:52 02.09.2002, Randy Kobes wrote:
[ ... ]
> >I was thinking more of the hierarchy, not of the functional
> >grouping. The convention of X::Y::Z being related to X::Y by, eg,
> >using or requiring it or through inheritance is widespread (and
> >is generally used at the top-level Apache::* namespace). One
> >might similarly expect an Apache::Util::* module to require in
> >some way Apache::Util, which if not true, could be confusing.
> >Although this isn't a forced convention, it's so common that I
> >think breaking it shouldn't be officially encouraged.
> 
> Not so according to the module list:
> 
> "e) The perhaps most interesting namespace protection is provided by the 
> perl symbol table itself. A namespace Foo:: is just a package name and its 
> relationship to a namespace Foo::Bar:: is not predetermined whatsoever. The 
> two namespaces can be closely or loosely related or not related at all, but 
> what's most important, they can be writen by different authors who may work 
> rather independently from each other. So if you have registered any 
> namespace, it does not mean that you own the whole namespace tree that 
> starts there. If you are registered as the contact for Foo::Bar, you are 
> not necessarily also associated with Foo::Bar::Baz. "
> 
> See http://www.cpan.org/modules/00modlist.long.html#ID5_NamespaceCo

That's what I meant by the hierarchy not being a forced
convention. However, this natural association has evolved, at
least for 2nd level namespaces (eg, File::Spec::* related to
File::Spec, Apache::Session::* related to Apache::Session). It
isn't as widespread at the top level, where it does occur (eg,
Tk::* related to Tk), but also, when the name isn't a module (eg,
File), it denotes a generic category. But having a 2nd level name
denoting a generic category isn't widespread, so the
useage/inheritance association is more widely expected when the
2nd level name exists already as a module.

-- 
best regards,
randy


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to