Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Namespace for libwv wrapper class?

by talkasab (Acolyte)
on Jun 21, 2003 at 21:10 UTC ( #267869=perlquestion: print w/replies, xml ) Need Help??

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

Howdy. I'm building a wrapper module for the useful libwv MS Word document parser. When I finish and contribute it back to CPAN (it will be my first public module), one will be able to deal with Word files and almost all of their idiosyncrasies without resorting to a Windows machine (or an external process).

My question is, into what name space should I put this new class? I looked on CPAN for something appropriate; the closest currently existing top-level name space is Text, which would give us Text::Libwv for the whole module. I'm not sure that's entirely appropriate however, because it isn't really text until you pull the stuff out of it. One possibility is something like MSWord::Libwv; that's a good description of it, but creates a new top-level namespace, which might make the module harder to find.

Any thoughts? Have I missed a current top-level name that works well? Should I settle for Text? Am I justified in making up a new top-level name?

Replies are listed 'Best First'.
Re: Namespace for libwv wrapper class?
by Beatnik (Parson) on Jun 21, 2003 at 22:02 UTC
    I'm gonna go out on a limb here but why not use something like MSWord::Document, in analogy to RTF::Document or PDF ? If this is a whole new document type for CPAN, I'm sure getting it's own namespace will do.

    Greetz
    Beatnik
    ... I'm belgian but I don't play one on TV.
Re: Namespace for libwv wrapper class?
by Aristotle (Chancellor) on Jun 22, 2003 at 00:26 UTC
    I don't like the current situation with a lot of different toplevel namespaces. I looked around as far as I could and didn't find anything this could really fit it. Personally I think it would be sensible if such modules - not just yours, but those dealing with any type of file, esp those produced by office suites - were placed under a Document:: root namespace. That would make yours something like Document::Word::View. The current Spreadsheet:: modules would fit in there nicely too, as would the PDF:: stuff.

    Makeshifts last the longest.

      I am not experienced in this CPAN logic but I believe that Microsoft has left clear that they should be considered as a 'different' namespace :).

      That is, they are never subscribing to any standard that they don't create or modify in a non-standard way. Don't you think?

      What ever the logic that might apply to CPAN modules, the best way to manage all would be to reflect reality.

        That doesn't make any sense. It is not up to Microsoft to name this module, nor is the library behind it written by them. Why in the world would we adopt the same practices we dislike for things we create just because they happen to be in some way tangential to Microsoft?

        Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://267869]
Approved by Paladin
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2019-08-23 16:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?