Posted by on January 12, 2017

I have been coding perl for decades.  My Camel book was pink, and man was it cool.  I have used many languages for fun and profit since I picked up perl, but it has always remained my go to tool to get me out of bind after bind.  If MacGyver had had perl in his back pocket rather than a swiss army knife… sorry, that is just getting silly.  My language is not better than your, but it is mine and I love it.

Needless to say I was disappointed when Google decided that my baby was not attractive enough to make the pantheon of supported API Client Libraries, but with no need at the time to access the APIs I did not think much of it.  Besides, if Google didn’t officially support it someone on the community was sure to.  Right?

The day finally came a few years when I wanted to programmatically access a Google Sheet and started my search for that library that was sure to be there.  What I found was discouraging.  The module space seemed fractured and incomplete.  I saw a thing for OAuth2 over there, a few modules referencing the deprecated SOAP API, and a couple of application specific modules.  In addition most of these modules seems like they were stuck in alpha state, were poorly documented, and after some trials, buggy.  Luckily I came across Net::Google::Spreadsheets which was exactly what I needed.  It was solid, did what I want, and the documentation was good enough to get started.

A few more years passed bringing me up to December 2016.  Now I needed to access a spreadsheet of email addresses and sync it with a few Google groups for simple management.  All in all I needed access to the Directory API, the Sheets API, and the Drive API.  I searched again assuming a rich forest of modules existed to cover these needs but to no avail.  The environment had barely changed since my first investigations.

I feel like I am missing something. If you read this and think “What a fool! Doesn’t he know about XYZ?” please let me know.  Hours of searching and days of trying various modules leaves me feeling like we, the perl community, have a big gap here. Now, at the end of the day the Google APIs are RESTful with OAuth2 authentication so I was able to get done what I needed, but I was left feeling that it should have been much easier.  I felt I needed to become and expert in OAuth2 and how the APIs worked at a low level to complete my tasks.  Though I am now richer for the experience, if it is that hard to do others will look for an easier path and choose one of the officially supported libraries and leave perl behind.

Over the next few posts I will detail what I discovered, what existing modules I used, and what gaps I think we might be able to fill in the future.

 

 

Posted in: google api, perl