Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Module Naming

by Spidy (Chaplain)
on Nov 11, 2007 at 01:33 UTC ( #650108=perlquestion: print w/ replies, xml ) Need Help??
Spidy has asked for the wisdom of the Perl Monks concerning the following question:

Hello, all.

I'm currently putting the finishing touches on a module that I think might be useful to someone other than me - it converts seconds into abstract measures(e.g.-"3 years, 28 months","2 hours, 23 minutes",etc.).

However, I cannot figure out what to name it. Time::Fuzzy is taken, and my best guess so far has been to call it Time::Abstracts.

Do any other monks have suggestions as to what to name my module?

Thanks,

Spidy

Comment on Module Naming
Re: Module Naming
by dragonchild (Archbishop) on Nov 11, 2007 at 01:42 UTC
    Put it under DateTime:: - call it DateTime::NaturalLanguage and release DateTime::NaturalLanguage::EN with it and allow someone to come along and create DateTime::NaturalLanguage::CN or ::FR or whatever.

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
      I think that this is the best idea thus far - but I'm a little confused. How exactly would I go about releasing DateTime::NaturalLanguages and DateTime::NaturalLanguages::EN with it? Would I just release the two modules (both in english), and then mention in my POD that if anyone wanted to translate it they were free to?
        Release one distribution called DT::NL and have it bundle DT::NL and DT::NL::EN. That will be the default choice, but you might want to look at whatever localization ENV there might be. Or, just let the user set it. DT::NL will create and return a DT::NL::EN - it will be a factory. You mention in the POD for DT::NL that there is a mechanism for providing different languages and point to DT::NL::EN as a reference implementation. Then, you don't do anything else and let people release versions as they see fit. As they do, you will get requests for new features or to reorganize the code in such a way as to make their lives easier. Be responsive and you just created a community around your little module.

        My criteria for good software:
        1. Does it work?
        2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
      Unless the module provides a standard "DateTime" object somehow, it would be confusing to put it under the "DateTime"-namespace.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: Module Naming
by Fletch (Chancellor) on Nov 11, 2007 at 02:31 UTC
      Similar, but not quite the same - while DateTime::Format::Duration takes a hash as arguments, this module would be taking a number of seconds - which it would then convert into the respective values.
        hmm, this sounds like it is almost exactly what I was looking for a couple of years ago....

        I'd be interested to see your code, and how it compares to some of the methods offered in that thread.

Re: Module Naming
by Popcorn Dave (Abbot) on Nov 11, 2007 at 04:43 UTC
    What about Time::Abstract or Time::English?


    Revolution. Today, 3 O'Clock. Meet behind the monkey bars.

    I would love to change the world, but they won't give me the source code

Re: Module Naming
by diotalevi (Canon) on Nov 11, 2007 at 06:42 UTC

    It sounds like a Lingua::EN::Duration to me.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Re: Module Naming
by jdporter (Canon) on Nov 11, 2007 at 14:39 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2014-09-20 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (159 votes), past polls