Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Contributing to CPAN!

by rje (Deacon)
on Oct 22, 2004 at 16:53 UTC ( [id://401573] : perlmeditation . print w/replies, xml ) Need Help??

I'm in the midst of contributing my first CPAN module, and I'd like to share the experience... it seems to be both terrifying and tedious at the same time.

Tedious, because CPAN has reasonable and meaningful guidelines that nice guys like me will follow.

Terrifying, because the process makes me realize how horrible it would be if I messed up. I might upload things wrong. I have to do POD right. I have to think about new things, like Makefile.PL. I might forget something critical.

Here's the process, as far as I can remember it right now.

  1. Register your$self. PAUSE exists to provide to contributors access to CPAN. Relatively painless in and of itself, but during and after the process one feels the weight of responsibility settling onto one's back.

  2. Request a namespace. Follow the suggested method for considering namespaces, and do what they tell you. I was going to request a new top-level namespace, but then thought better of it. So I found a useful namespace that was already there; in fact, a colleague on an online forum suggested exactly the same namespace I settled on. If that ain't helpful, I don't know what is. The confirmation came via email.

  3. The scary part: upload your zipped-up module, complete with auxiliary files (README, Makefile.PL, etc!). File names are immutable and irreplaceable, even when they are deleted from CPAN. This means your uploaded file should have the version number appended to it: UWP-0.90.gz, forex.

I'm at step 3. Haven't uploaded my module yet; I'm still getting my act together and preparing for the big jump. I'm a little scared about it, but excited too. Probably blowing it up out of proportion; however, my actions, in some small way, can contribute positively to the Perl community.

So I'm taking it seriously and savoring the experience.

Replies are listed 'Best First'.
•Re: Contributing to CPAN!
by merlyn (Sage) on Oct 22, 2004 at 16:59 UTC
    File names are immutable and irreplaceable, even when they are deleted from CPAN.
    This is not true. Deleting them from the CPAN takes three days, but it does indeed work. They are only permanent on the BackPan.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

      But, at least according to the documentation (I haven't tried), you are not allowed to upload a new version with the same filename.

      My response to rje is not to worry too much. Even experienced authors sometimes make silly mistakes and upload files with something missing. Just delete the bad file and upload a new version.

      To paraphrase Johnny Hart: "I phrased that lousily". Mea culpa.

      Is now the right time for me to cover my tracks by babbling on about the semantic meanings of deleting files versus deleting file names?

Re: Contributing to CPAN!
by revdiablo (Prior) on Oct 22, 2004 at 21:54 UTC

    I just recently uploaded my first CPAN module too (Algorithm::BinPack, in case you wonder). Interestingly, my experience was a bit different from the one you describe. It was kind of fun and exciting, if such words can be used to describe the process of uploading a file to an archive. Building a nice test suite was an interesting challenge for me, and I was pleasantly surprised by the automated testing done by My carefully crafted test suite passes on 6 different platforms! That's satisfying.

    I wasn't terrified of making mistakes, either. Everybody makes them, and unless they cause the death and/or destruction, they're only truly bad when you don't correct them. For instance, when I uploaded the 2nd version of my module, I accidentally broke the test suite. Silly me! I forgot to check it before uploading. So I fixed it, and uploaded another version. No big problem, just a bit of egg on the face. As long as you're willing to correct any mistakes and move on, I wouldn't worry too much about getting your upload perfect the first time.

Re: Contributing to CPAN!
by samtregar (Abbot) on Oct 22, 2004 at 18:15 UTC
    You might enjoy reading my book about writing modules for CPAN. It covers the mechanics of getting a module on CPAN in great detail as well as lots of other useful stuff.