Monday, October 19, 2009

CPAN Module

You may recall my earlier post complaining that Amazon has not created a Perl module to sign AWS REST queries, so I ended up writing my own. It was a good exercise for many reasons; writing your own module gives you a better overall understanding of how the whole process works, and of course helps much later on if you need to debug something. Also, I'm ashamed to say this, but I was never a big fan of OO programming before - generally if I wrote a module, it was going to export functions, because I was just used to my way of thinking (just write functions, export them, and use them with arguments when required). Since I'm not a trained developer, I saw no reason to force a paradigm shift upon myself. Writing a module, of course, forced me re-write my AWS code in an OO way, and now I see the light, or at least I see how for many things that's a better way to go.
Anyway, I wrote this thing a couple of months ago, and I figured it was only a matter of time until Amazon released an official mod to sign requests, but they never did. When I was in NY, Matt encouraged me to submit it to CPAN - if nothing else, it's a resume-builder, plus I'm so dependent on CPAN for everything, it would be nice to give something back. So, I cleaned it up, added a method to create SOAP signatures (since I figured that at least some people would want that), and submitted it to CPAN. Actually getting that module into CPAN, however, was a lot of work: besides creating an account, I had to submit an official request to have the module added, then I had to make sure it was stable and portable, plus I had to write it the "right" way and have it vetted by the CPAN testers. I had no idea it was so much work! But, at the end of the day, I got it in, and until Amazon decides to write their own, I guess I'm the official owner of the Net::Amazon::AWSSign mod. W00t!

1 comment:

Anonymous said...

Huzzah! That's really really cool!