Open Source Contributions: Perl Helper Library for Twilio by Scott Wiersdorf
Time to read: 3 minutes
I’d appreciate any feedback on either the code or the documentation to make it clearer:
Join the conversation about Scott’s Perl Helper Library on our forum
Scott Speaks Up on Being a Twilio Developer
What motivated you to write a Perl Helper Library for Twilio?
Curiosity, mainly, I think, and maybe a little self-promotion (full disclosure: I’m a semi-recently-laid-off-employee-turned-contractor, so I love doing anything I can get paid for! Unfortunately, I’m also a programmer at heart and love hacking on fun technology even when it doesn’t pay the bills. Ask my wife. Actually, don’t do that).
Seriously, though, I recently wrote an API for another REST-y service and wondered how hard Twilio’s would be after that. (Answer: not hard at all. See answer for question 2), especially since I had an interest in it.
When I thought that if I wrote this library, I could place calls from *any computer* to *any phone* at *any time* and say *anything* in *two beautiful lines of code*–it was goodness too powerful for me to leave alone.
How long did it take to create the library?
It took 4-5 hours for me to grok Twilio generally (this is my first web-telephony experience–you can see a couple of questions I had in the forums that were quickly and expertly answered). Once I had my head around how Twilio worked, I wrote the API helper library in under an hour (it was quick because my head was already in a REST-y place), but I must have put in 3 hours to document how it worked. You can see that the documentation is *far* longer than the code it describes.
What else are you currently building with Twilio (or using this library for)?
Well, it’s getting to be autumn in my neck of the woods (Pleasant Grove, Utah) and I wanted an early frost warning system so I knew when to pick the tomatoes.
I thought it would be neat if there were a web-to-phone application that I could plug into my weather/temperature alert system. After a little investigation, I stumbled upon Twilio and realized that writing a helper library was going to be far more fun than protecting my tomatoes.
Maybe I’ll write some kind of general purpose web-to-phone reminder system.
Twilio note: make sure to check out our Weather By Phone sample code
If you had all the time in the world, what would you build with Twilio?
I think that’s a funny question because I can’t think of anything that would take very long to write with Twilio. All the ideas I can think of could be done in a day or two at the most.
Plus I’m really more of a systems guy than an application guy (when given the choice), so I’d probably continue to write helper libraries or, if I had access, work on the API itself. I think in a week or two I’ll have the gumption to write a TwiML helper library for Perl.
I’ve toyed with writing a broadcast phone message system for my kids’ school in case of an H1N1 breakout or snow days, etc. With the API helper library, it shouldn’t take more than 10 lines on the Twilio API side and maybe that many on the TwiML side.
Or how about this: plug Twilio into a home automation system where you could check the status of your lights, alarm system, doors and windows, etc. temperature. Turn things on and off, etc. using Twilio to provide the voice command recognition and action dispatcher.
Thank you Scott, we will be adding your library to our list of helper resources and sending you a t-shirt and some other Twilio goodies. To anyone else thinking of making an open source contribution – let us know! We’d love to blog about it, send you some cool stuff, and help other Twilio developers become more productive in the process. Drop us a line at help@twilio.com anytime.
Related Posts
Related Resources
Twilio Docs
From APIs to SDKs to sample apps
API reference documentation, SDKs, helper libraries, quickstarts, and tutorials for your language and platform.
Resource Center
The latest ebooks, industry reports, and webinars
Learn from customer engagement experts to improve your own communication.
Ahoy
Twilio's developer community hub
Best practices, code samples, and inspiration to build communications and digital engagement experiences.