JayBonci has asked for the wisdom of the Perl Monks concerning the following question:

Taking this off the modules@ list and onto here where a few knowledgable people hang, I'd like some opinions if I could. Currently I have a module on CPAN, Parse::DebControl. Now from the modules list, Tim Bunce suggested moving it into the Debian:: namespace, which I like, but thought that Debian::Control was too vague. He suggested Debian::ParseControlFile as a counter-point, but I'm debating over going with Debian::ParseControl, which seems good.

The quick overview of the module is for reading and writing of debian control-style fields (apt archives, debian control and template files, various other dpkg items).

Any insight over which one is better than the other would be highly appreciated. Thanks,

    --jaybonci
  • Comment on CPAN namespace help for Parse::DebControl

Replies are listed 'Best First'.
Re: CPAN namespace help for Parse::DebControl
by crenz (Priest) on Apr 28, 2003 at 16:43 UTC

    I see there's a DPKG-Tools package on CPAN. Maybe your module would fit nicely inside that package? It seems that your module would be most useful to those people that already handle dpkgs anyway.

    Another idea would be to put it into the Archive:: namespace, which is already well-established. E.g.

    • Archive::dpkg::ParseControl
    • Archive::Debian::ParseControl
    • Archive::dpkg::ControlFile
    • Archive::Debian::ControlFile

    I find it nicer to flesh out existing (and fitting, of course) namespaces rather than creating new ones.

    Update: By the way, I don't find it so necessary to have "Parse" in the name. Many Perl modules do parsing, and most of the time it is just enough to name the thing that your module is dealing with (in this case: control files). It is implied that you parse those files in order to read/write them :).

      I thought about the Archive::Debian namespace. My main objection with putting it in there, is that it's going to get lost. So many things in the distro are in that control format, and Archive isn't the first place I'd look for a parser.

      With Archive::Ar now complete, and with this module, I am going to be creating an Archive::Debian module that does debian .deb creation in pure perl / architecture independantly. This means that you could make fink debs, or debs even for win32 if you wanted.

      It mainly will solve my problem of wanting debian package analysis utilities on RedHat without porting the binary libraries.

      I agree with you that Debian::Control sounds good (because there's a lot of use for it, and the intended audience would know what it's for), but there are many wiser than I, and I'd like to see what some other more experience CPANites have to say.

          --jaybonci
Re: CPAN namespace help for Parse::DebControl
by chip (Curate) on Apr 28, 2003 at 17:19 UTC
    Control files are used for building debs, not using them. So I suggest Debian::BuildControl, or some such.

        -- Chip Salzenberg, Free-Floating Agent of Chaos

Re: CPAN namespace help for Parse::DebControl
by Aristotle (Chancellor) on Apr 28, 2003 at 20:10 UTC
    It seems to me that once it's perfectly clear what thing it's dealing with - .deb control files -, the fact that it has to parse them is more or less blindingly obvious. So the priority for the name should be clarifying what it deals with, for which Debian::DebControl or the IMHO slightly less clear Debian::ControlFile would work well.

    Makeshifts last the longest.

Re: CPAN namespace help for Parse::DebControl
by jaldhar (Vicar) on Apr 28, 2003 at 17:15 UTC

    I would just go with Debian::Control. For the first part there is precedence with namespaces like win32, solaris etc. For the second, anyone who is likely to use the modules will know what control refers to. Parse as mentioned by another monk is redundant.

    --
    જલધર