Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Module Namespace, CPAN, and Linguistics

by Polyglot (Pilgrim)
on May 19, 2009 at 04:36 UTC ( #764825=perlmeditation: print w/ replies, xml ) Need Help??

I'm putting together some routines for identifying characteristics of the Thai alphabet, making useful character classes, and may include some other nice features such as word splitting and/or sorting. I hope to package a module for CPAN from these, for the benefit of the Thai community.

CPAN recommends discussion regarding the NAMESPACE for each module, and I thought some of the monks here might have wisdom in this area.

If you see a module for a language, for example if a module were called "Swahili," what would you expect it to contain? For a rare language, will such a broad and generic name become "namespace pollution" later on? What about "Thai" vs "Thai::CharClass" etc.?

Perhaps many languages do not have modules named after them. Should I be looking instead at something like "Lingua::Thai::CharClass"? or does this seem like it gets too unwieldy?

Last but not least, if a previously created module (such as Lingua) becomes the base of the new namespace/module, does this mean that the developers would need to work together to accommodate the name? Since I have never created a module before, this is unclear to me...would I send the module to the authors of Lingua, for example, to be included in their package?

Thank you for your patience with this neophyte.

Blessings,

~Polyglot~

Comment on Module Namespace, CPAN, and Linguistics
Re: Module Namespace, CPAN, and Linguistics
by Your Mother (Chancellor) on May 19, 2009 at 04:53 UTC

    You might also consider Lingua::CharClass::Thai, especially if you can get a generalized Lingua::CharClass piece which either sets some baseline functions for subclassing or contains no code but Pod for how to do new CharClasses so other authors can jump in and keep a uniform interface. I suggest keeping to the ISO abbreviation for Thai, so Lingua::TH::CharClass or Lingua::CharClass::TH.

Re: Module Namespace, CPAN, and Linguistics
by JavaFan (Canon) on May 19, 2009 at 12:19 UTC
    CPAN has Parse::RandGen::CharClass, CharClass::Matcher, and Regexp::CharClasses. Perhaps you can build on one of those namespaces (although I have to say, I haven't checked what those modules do)? Or you could send a patch if one of the modules fits, or perhaps a patch for one of the existing Lingua modules.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2015-07-04 05:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls