Lo and Behold – I think I’ve finally found something that I’ve been searching for a really long time now: A new perl module that doesn’t already exist, there is a need for and I’m actually interested in building! Wow!
What is this mysterious module, you ask? A perl interface to the Google Short Links API.
Anyone familiar with Google Apps or the various functions available through Google Labs is probably familiar with the goo.gl domain and the short links that it provides. What you may not realize is that anyone who has a custom domain with Google Apps services can also use Google Short Links on their own domain.
For example, on my SouthLAnd Site, we registered the domain sfc.me (short for Southland Fan Club, because we also own SouthlandFanClub.com/net/org/info/etc) about as short a domain as you can get without paying a premium price. I then added the Short Link service to Google Apps for SouthlandTvFans.com via the Google Apps Marketplace, Google Labs service.
I added the domain www.sfc.me as the “short link domain” on Google Apps (you can currently only add one full domain – a minor shortcoming of the system) with a DNS CNAME pointing to ghs.google.com. For the non-www domain, sfc.me, I added a DNS A record pointing to my web server with a mod_rewrite rule redirecting http://sfc.me/(.*) to http://www.sfc.me/$1, allowing the short links to be as short as possible. This is necessary because Google (for some odd reason) requires that you use a subdomain for the short link service, so this work-around is the only way to do it with the shortest possible links.
All of that is well and good, with one minor exception: You must log into Google’s website to add or edit links! However, like most of their services, Google does provide an API for managing short links. There is even an example CLI script for using the API – but it is written in python, of all languages.
So my new project and first individual contribution to the perl community: A module to manage Google Short Links. I’m still not sure what the name of the module woudl be yet, as I need to do some research on CPAN for existing Google modules to see where it would best fit into the name space.
I’ve always said I wanted to write a perl module, if I could just find something that was needed, necessary and not already done by someone else. Finally, I’ve found that subject that is not only new, but something that will directly benefit me in my work at the same time. A total win-win!
