I've never submitted anything to CPAN. Maybe I would if they made it a little bit easyer for people who haven't done so before to do so. Maybe they keep it hard to keep crud on the outside. If so, great..
Writing a module counts if it was never distributed to CPAN right? :) I should add that I had quite a bit of help from PerlMonks for which I am very grateful. I still do not entirely understand how to write modules without referring to a bunch of reference material.
I wrote my first answer to Life, the Universe, and Everything(?) probably about five years ago. In my opinion, although some may disagree, it's easier to do this then to write a Perl module. Some modules are often updating, whereas The Answer has never changed since Douglas Adams's initial discovery and included it in the Hitchhiker's Guide.
Update: Fixed the name and the E2 link.
Love is random; fear is inevitable. -- Orson Scott Card PerlMonks is good for Perl, but
JavaJunkies is good for Java
I used to use a lot of required scripts that I'd written, but these hardly compare to using proper modules. About the time I was reading perlboot and learning OO perl, I also happened across the Monastery. I know modules aren't just for OO (and certainly not functional programming), but understanding OO Perl has affected my ability to get into modules, from a writing and using perspective. I'm still trying to tame my enthusiasm for turning everything into one giant instance.
Side Note: For anyone who hasn't read perlboot, I must say it is a shining example of why merlyn is a leading Perl trainer. He starts you from the ground and builds from there, when you're done you've got the basics of OO like no other perldoc can teach it. And it wasn't until about a week ago, trying to understand closures and searching the vastness of the Monastery, that I found a link to one of his articles which lifted the scales from my eyes about what it really meant to program functionally. Thanks, merlyn!
And of course my usage of CPAN modules has gone up considerably since I found PM. I'd never really understood CGI.pm before I came here. And the CPAN nodelet is a life-saver. 99% of the time it gets me right to a module I can take advantage of.
File::chmod might not have been my very first, but it was the first one I felt confident enough to package and submit to CPAN. It's even mentioned in "Learning Perl" (at least, in the 3rd edition), and Randal and Tom (Phoenix) mention it in all their tutorials. :)
Being a relative new-comer (still, ugh), I have yet to write one, but I'm working on it when I get time... :)
Tempora Mutantur Nos et Mutamur in Illis
"The Times are Changed Even as We are Changed in Them"
This was the same problem I ran into once upon a time. What I ended up doing was writing modules strictly for myself (that is, not for upload to CPAN) that were little shortcuts for things. Anything that I found myself doing with any regularity at all, I wrote as part of my series of "Kurt" modules. Writing several of these was sort of like grist for the mill. It got me thinking in module writing mode, and then from time to time, an idea for something new would pop up, which would lead to a module that was eventually uploaded to CPAN. You can, I think, apply the same rule to writing perl modules that you are supposed to apply to writing fiction: write about what you know. Write a few simple modules strictly for yourself, and then when the Perl Muse decides to perch upon your shoulder, just sort of run with it from there.
I wrote my first module just as a collection of quick utilities that I found myself needing a lot. Getting a datestamp in a particular format, converting IP addresses between an xxx.xxx.xxx.xxx string format and a numeric format, that sort of thing. It made great practice for when I started building a set of modules for other folks in development group to use.
Yes, I did go down the h2xs route even tho the module is only
seven short subroutines in perl, mainly because I'm lazy.
At first, I didn't realize that I had to run
make; make test; make install to access the module.
I am proud to say that I have written some POD and test
routines for the subs
I actually just wrote my first module, but as you can see from the responses, there was a lot to be desired in it, not to mention, I had basically re-invented the wheel. On the other hand, it gave me some experience using h2xs and just good practice for when I actually do write something worthy of CPAN.
-------- There's an infinite number of monkeys outside who want to talk to us
about this script for Hamlet they've worked out -- Douglas Adams/Hitchhiker's Guide to the Galaxy