The Net::Jabber::Bot Project

For the January meeting, Todd Rinaldo lead a maintenance session on the Net::Jabber::Bot module. This module is based on the Net::Jabber module. Unfortunately, Net::Jabber is not currently maintained. We talked about the potential of trying to take over the Net::Jabber module and maintain it. This is, however, a pretty big job and is tangential to the main project.

One problem that Todd had been fighting was warning messages from inside the IO::Prompt module caused by the -w switch. We modified the tests to remove this warning. Todd's current implementation uses Class::Std for its OO support.

One major difficulty with testing modules like this is that they depend on access to an external server to function. The dolution to this problem is a technique called Dependency Injection. We modify the object construction to allow us to supply a replacement object for the internal Net::Jabber object that we normally create and that connects to the server.

We can now provide a mock object that provides just enough functionality to support the tests we want to run. This mock must match the portion of the interface we are depending on, but it does not need to implement it in the same way.

Todd also set up a project for development of Net::Jabber::Bot at Google's code site.