Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

advice on writing a module

by mrm (Novice)
on Jan 31, 2011 at 01:00 UTC ( [id://885179]=perlquestion: print w/replies, xml ) Need Help??

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

hi all

i've been lurking for a couple of months and would like some guidance

so ive got a bit of free time and would like to learn about the process of writing a module for cpan by writing a module myself.

My first idea was to write a module that gives you information on tv series. but i found what looks like a pretty decent module in WWW::TV and WWW::TV::Series. Now i could write a similar module that uses another online tv database (like tvrage or something other than tv.com). but its pretty similar and should contain the same info. also after reading a few guides on writing perl modules, ive been told to search first and not duplicate content on cpan. so would it be worth writing this module but using a different information source?

my second idea was be to have a module that would give you information about a person on wikipedia. so for example you create a new object with the string "john doe" and it will search wikipedia and give you john doe's date of birth, nationality, occupation, etc. (basically that information in the side bar). i couldnt find anything like this on cpan, so i just wanted to get your opinions on whether or not this would might be a decent idea for a cpan module?

my last idea was to write something similar to the first idea (info on tv series & episodes) but for games (probably using gamespot) to get information about a particular game. there doesn't appear to be anything like this on cpan.

so id like to hear your opinions on those ideas. also, if any of you have ideas for me too, perhaps something you thought of but never got around to writing, i'd like to hear about them

cheers :)

mrm

Replies are listed 'Best First'.
Re: advice on writing a module
by bluescreen (Friar) on Jan 31, 2011 at 02:42 UTC

    On the first matter I'd definitely get in touch with the original developer of WWW::Tv if its just another database chances are A: He/She already thought on it and adding one parameter to the constructor would be enough to read that. B: Is willing to let you contribute by submitting a patch. It doesn't makes sense to me to write a 95% similar module. What makes CPAN/Perl rich is the community behind and I'm sure the owner of that module would love any feedback you might provide.

    On the second module if it is worthy for you just write it, there will be others like you that need the same and will appreciate that someone else took care of it. Even if you end up not uploading it I think its a valuable experience trying to write a module that someone else would use and coping with CPAN's requirements for public domain modules

Re: advice on writing a module
by toolic (Bishop) on Jan 31, 2011 at 03:27 UTC
    i found what looks like a pretty decent module in WWW::TV
    Maybe at one time WWW::TV was decent, but it looks like it hasn't had a passing test in over a year, since perl 5.10, on any platform. Refer to https://rt.cpan.org/Public/Bug/Display.html?id=44678.

    I second the notion that you should attempt to contact the author. Since you understand what this module is trying to do, you could perhaps assist in nursing it back to health. Try to patch the module so that it's tests will start to pass again. If the author responds and has lost interest, request to become a co-maintainer.

      You know, I didn't even think to look for whether or not it is currently a working module. Will definitely contact the author and see if I can help get it working again :)
Re: advice on writing a module
by eyepopslikeamosquito (Archbishop) on Jan 31, 2011 at 05:32 UTC

    so ive got a bit of free time and would like to learn about the process of writing a module for cpan by writing a module myself
    In case you haven't seen it already, this recent node is well worth a read: RFC: How to Release Modules on CPAN in 2011.

Re: advice on writing a module
by CountZero (Bishop) on Jan 31, 2011 at 07:36 UTC
    The wikipedia idea seems good, but do have a look at the licensing conditions of Wikipedia!

    You must provide a link to the text of the CC-BY-SA-licence and to the page where you got the information from.

    The easiest way to do this is to include these links as properties of the object your module provides.

    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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-03-28 20:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found