Always Check CPAN - I mean _ALWAYS_

davorg on 2005-09-11T14:11:16

I've been looking at Prototype and script.aculo.us - both interesting Javascript libraries that make it easier to put more interactivity into your web applications. I noticed that there was already an HTML::Prototype that made it easier to use these libraries from Perl programs but, like any sane person, I don't use Perl to build HTML pages - I use the Template Toolkit. I decided that I needed a TT plugin that wrapped HTML::Prototype.

So I spent a couple of hours this afternoon writing this plugin. It really wasn't hard. TT Plugins that wrap an object oriented module are really simple to create.

But the problems started when I uploaded the finished module to CPAN. I got an email back from PAUSE telling me that I did'nt have permissions to access that distribution. And PAUSE was right. There's already a Template::Plugin::HTML::Prototype written by Bernhard Bauer. And its code is almost identical to mine.

And now I find that search.cpan.org has indexed my version and is returning it in preference to Bernhard's in search results. I've scheduled the deletion of my version, but that will take a few days to be processed.

Don't do as I do, do as I say. Always check CPAN before writing any code. You'll probably save yourself a lot of time.