(CC'd to [EMAIL PROTECTED], but not anymore to [EMAIL PROTECTED], where the
thread started.)

>>>>> On Mon, 22 Apr 2002 13:28:01 +0200, [EMAIL PROTECTED] (Robert Joop) said:

  > On 02-04-22 13:06:59 CEST, Andreas J. Koenig wrote:
 >> >>>>> On Mon, 22 Apr 2002 11:49:18 +0200, [EMAIL PROTECTED] (Robert Joop) said:
 >> 
 >> > hi,
 >> > i've got a problem understanding namespaces.
 >> > i've written a module that provides X500::DN objects, it parses them
 >> > from RFC2253 strings and formats them into that format, among other
 >> > things.
 >> > it installs like this:
 >> 
 >> > Installing /tmp/X500/DN.pod
 >> > Installing /tmp/X500/DN.pm
 >> > Installing /tmp/X500/RDN.pm
 >> > Installing /tmp/X500/RDN.pod
 >> > Installing /tmp/local/man/man3/X500::DN.3pm
 >> > Installing /tmp/local/man/man3/X500::RDN.3pm
 >> 
 >> > there is an older module that is just a parser object, X500::DN::Parser
 >> > from RSAVAGE.
 >> > it installs like this:
 >> 
 >> > Installing /tmp/X500/DN/Parser.pm
 >> > Installing /tmp/local/man/man3/X500::DN::Parser.3pm
 >> > Writing /tmp/i386-linux/auto/X500/DN/Parser/.packlist
 >> > Appending installation info to /tmp/i386-linux/perllocal.pod
 >> 
 >> > as you can see, they don't collide on a technical level.
 >> 
 >> > but do they collide on a namespace level?
 >> 
 >> No.

  > fine, which namespace shall i pick?

 >> > what are the correct namespaces for the two modules?

  > i didn't see any answer to this question, i'm afraid.

Oops, sorry, see below...

 >> the whole process more transparent. Let us know which questions remain
 >> open.

  > what is the relation between modules and namespaces?

In many cases it's a one to one relationship, but sometimes it's a
many to many relationship: one module can use several namespaces and
one namespace may appear in several modules.

CPAN is optimized for the case of a one to one relationship. The other
cases sometimes require people talking with each other.

  > the RSAVAGE module that gives you X500::DN::Parser objects is under
  > the X500::DN namespace in the long modules list.
  > is this correct?

Yes, I missed this in my first answer.

  > shouldn't this be X500::DN::Parser?

Apparently, yes! Sorry, needs fixing.

  > if the X500::DN namespace is correct for X500::DN::Parser, do i need to
  > register the X500 namespace for my module that gives you X500::DN objects?

No, we want a sane mapping of namespace X500::DN::Parser to
X500/DN/Parser.pm as it is enforced by perl itself.

  > but for Net::Daemon::SSL or Math::Calc::Units or Tie::Hash::Regex
  > (random picks from 00modlist.long.html) the package name and the namespace
  > are the same!

What a relief:-)

  > so, there some inconsistency which confuses me.

I have manually corrected the database, so that Ron's entry will change from

X500::
::DN               MdpO? X500 Distinguished Name parser               RSAVAGE

to

X500::DN::
::Parser           MdpO? X500 Distinguished Name parser               RSAVAGE


This has the side effect that X500::DN is again an unused namespace.

If you should pick it or not should be clarified between you and Ron
directly. If you two can agree, it's likely everybody else will agree.

  > the more i look at it the more i think that X500::DN::Parser is not
  > registered with the right namespace...?

Yes, but fixed.

-- 
andreas

Reply via email to