Virtual Spring Cleaning Prelude: What I did, and what hasn't happened so far

While trying to get some more of my modules ready for release, I've been doing drive-by patches to CPAN modules that I used for various reasons. While I'm not exactly enthused about throwing a patch with a testcase over the fence, I think it's still far better to have the problem and solution in some bug tracker somewhere than having it only on my hard drive.

The first module is JavaScript::Duktape, a small embedded Javascript engine with an XS module for Perl. My patch adds Strawberry Perl/MinGW compatibility to the XS module. The real patch would have to be applied upstream, but the Duktape engine uses its own meta-config system, and I'm already struggling with Metaconfig and have little interest in learning another metaconfig system for what is not even a prerequisite of my modules.

Status: Unapplied , but there has been up-upstream discussion.

I use a Fritz!Box as my DSL modem, router and VoIP adapter. The Fritz!Box also can manage the phone book for my cordless phone, but I was always too lazy to enter the contacts into the admin interface of the router. Their mobile app could transfer the contacts from my mobile phone into the router, but my ground source of truth is my CardDAV server, which maintains the contacts for my mobile phone and my emails. When I discovered that the Fritz!Box has a TR064 interface and that CPAN already has Net::Fritz, I started to use it to synchronize the phone numbers from my contacts to the router.

Net::Fritz works quite well, but it was slow because it created a fresh SOAP::Lite instance and a new HTTPS connection for every contact queried. A simple change to cache the connection gave me a speed-up of about 30% when doing multiple queries.

A second change there removed the SOAP::Lite magic of guessing the content type of data sent to the remote side and instead supplied explicit data types. As the Fritz!Box API only consumes strings, this was fairly simple to implement.

Status: Both applied and released

Leave a comment

About Max Maischein

user-pic I'm the Treasurer for the Frankfurt Perlmongers e.V. . I have organized Perl events including 7 German Perl Workshops one YAPC::Europe.